2005/5/10

     
 

Mapping between wxWidget and ACDK

artefaktur

The mapping rules for types on wxWidget and ACDK wrapper classes.


Content of this chapter:

   Difference between wxWidgets and acdk_wx
     Names
       Classes
       Methods
       Defines/Enumerations
       Free Function



 Difference between wxWidgets and acdk_wx

wxWidgets itself is a C++ library, but uses a different object modell than ACDK.

 Names

 Classes

Most (all?) classes and types starts with wx in wxWidgets.
acdk_wx uses namespaces:
wxWindow becomes to acdk::wx::Window in ACDK.
To avoid conflicts wxObject is not named acdk::wx::Object but acdk::wx::WxObject.

 Methods

The names of Methods starts with upper case in wxWidgets. The methods in ACDK WX starts with lower case. This has two reasons: Methods names with starting lower case is conforming to ACDK style guide and avoid overloading troubles between these two class hierarchies.

 Defines/Enumerations

ACDK doesn't support defines - of course defines can be used in ACDK, but they are not visible as meta info. All int defines of wxWidgets are tranfered to enumerations. wxWidget value wxEVT_COMMAND_CHOICE_SELECTED becomes to CommandEvent::EvtCommandChoiceSelected in ACDK WX.

String defines are either used hard coded or are available as static member of the related class

 Free Function

wxWidgets provides some functionally, which can be accessed via free functions.
ACDK meta object modell doesn't support free function. The free function of wxWidgets are available as static member methods in the related classes.