Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Member Functions | Private Attributes | Friends

wxsItem Class Reference

Base class for all items in resource. More...

#include <wxsitem.h>

Inheritance diagram for wxsItem:
Inheritance graph
Collaboration diagram for wxsItem:
Collaboration graph

List of all members.

Public Member Functions

void BuildCode (wxsCoderContext *Context)
 Request to build the code.
void BuildItemTree (wxsResourceTree *Tree, wxsResourceItemId Parent, int Position=-1)
 Function building tree in resource browser for this item.
wxObject * BuildPreview (wxWindow *Parent, long PreviewFlags)
 Function building preview for this item.
wxsQuickPropsPanelBuildQuickPropertiesPanel (wxWindow *Parent)
 Function building new quick properties panel.
bool CanAddToParent (wxsParent *Parent, bool ShowMessage)
 Checking if this item can be added to other parent.
void ClearSelection ()
 Clearing selection in this and all child items.
virtual wxsParentConvertToParent ()
 Function converting this item to wxsParent class.
virtual wxsToolConvertToTool ()
 Function converting this item to wxsTool class.
void EnumItemProperties (long Flags)
 Function enumerating properties of this item.
wxString GetAccessPrefix (wxsCodingLang Language)
 Getting access prefix for item.
virtual wxsBasePropertiesGetBaseProps ()
 Function returinng pointer to wxsBaseProperties class if item uses it.
virtual const wxString & GetClassName ()
 Getting class name.
wxString GetCreatePrefix (wxsCodingLang Language)
 Getting create prefix for item.
wxsEventsGetEvents ()
 Getting event managment object used by this item.
wxWindowID GetId ()
 Easy access to identifier value.
wxString GetIdName ()
 Getting identifier.
const wxsItemInfoGetInfo ()
 Getting item info.
bool GetIsExpanded ()
 Checking if node of this item in resource tree is expanded.
bool GetIsMember ()
 Checking if variable is member of class.
bool GetIsSelected ()
 Checking if item is selected inside editor.
wxObject * GetLastPreview ()
 Getting current preview object.
wxsResourceItemId GetLastTreeItemId ()
 Function getting lastest tree item id generated in tree.
wxsParentGetParent ()
 Getting parent item.
long GetPropertiesFlags ()
 Function returning flags of availability for this object.
wxsItemResDataGetResourceData ()
 Getting resource containing this item.
wxsItemType GetType ()
 Getting item type.
wxString GetUserClass ()
 Getting user class name.
wxString GetVarName ()
 Getting variable name.
bool IsPointer ()
 Function checking if this item is represented as pointer or as object.
bool IsRootItem ()
 Checking if this item is root item of resource.
bool MouseClick (wxWindow *Preview, int PosX, int PosY)
 Posting mouse click event from editor.
bool MouseDClick (wxWindow *Preview, int PosX, int PosY)
 Posting mouse double-click event from editor.
bool MouseRightClick (wxWindow *Preview, int PosX, int PosY)
 Posting mouse right-click event from editor.
void NotifyPropertyChange (bool CallPropertyChangeHandler=false)
 Function notifying about property change.
wxsPropertyStreamoperator<< (wxsPropertyStream &Stream)
 operator writing to property stream
wxsPropertyStreamoperator>> (wxsPropertyStream &Stream)
 Opearator reading from property stream.
bool PopupMenu (long Id)
 Requesting reaction to popup menu.
void PropStreamRead (wxsPropertyStream *Stream)
 Function reading all properties from property stream.
void PropStreamWrite (wxsPropertyStream *Stream)
 Function writing all properties to property stream.
void SetIdName (const wxString &NewIdName)
 Setting identifier.
void SetIsExpanded (bool NewExpanded)
 Changing currently stored value indicating whether item is expanded in resource tree or not.
void SetIsMember (bool NewIsMember)
 Setting IsMember flag.
void SetIsSelected (bool NewSelected)
 Changking current selection state.
void SetUserClass (const wxString &Subclass)
 Setting user class.
void SetVarName (const wxString &NewName)
 Setting variabne name.
void ShowInPropertyGrid ()
 Changid Property Grid focus to this object.
 wxsItem (wxsItemResData *Data, const wxsItemInfo *Info, long PropertiesFlags, const wxsEventDesc *Events, const wxsStyleSet *StyleSet)
bool XmlRead (TiXmlElement *Element, bool IsXRC, bool IsExtra)
 Function which should load this item and child items from xrc / wxs structure.
void XmlRead (TiXmlElement *Element)
 Function reading all properties from Xml node.
void XmlWrite (TiXmlElement *Element)
 Function writing all proeprties to Xml node.
bool XmlWrite (TiXmlElement *Element, bool IsXRC, bool IsExtra)
 Function which should write this item and child items from xrc / wxs structure.
virtual ~wxsItem ()

Protected Member Functions

void AddBuildingCode (const wxString &Code)
 Adding Manually building code.
void AddDeclaration (const wxString &Declaration)
void AddEventCode (const wxString &Code)
 Adding event connecting code.
void AddHeader (const wxString &Header, const wxString &DeclaredClass, long HeaderFlags=0)
 Adding header file into current context.
void AddIdCode (const wxString &Enumeration, const wxString &Initialization)
 Adding id-generating code.
void AddXRCFetchingCode (const wxString &Code)
 Adding XRC fetching code.
void BuildSetupWindowCode ()
 Helper function that will add code setting-up most of base properties of this item.
void Codef (const wxChar *Fmt,...)
 Simplified version of Codef function.
wxString Codef (wxsCoderContext *Context, const wxChar *Fmt,...)
 Helpful printf-like function used when creating source code.
wxsCoderContextGetCoderContext ()
 Getting current coding context.
long GetCoderFlags ()
 Getting flags of current coding context.
wxsCodingLang GetLanguage ()
 Getting current language.
virtual void OnAddExtraProperties (wxsPropertyGridManager *Grid)
 Function for adding extra properties - used to add events,.
virtual void OnAddItemQPP (wxsAdvQPP *QPP)
 Function filling up quick properties panel for current item.
virtual void OnBuildCreatingCode ()=0
 Building code manually creating resource, it may also be used to add header files.
virtual void OnBuildDeclarationsCode ()
 Default procedure generating declarations code.
virtual void OnBuildEventsConnectingCode ()
 Default procedure generating events connectiong code.
virtual void OnBuildHeadersCode ()
 Building headers arrays, it's not required since headers can be added in OnBuildCreatingCode()
virtual void OnBuildIdCode ()
 Default procedure generating identifiers code.
virtual wxObject * OnBuildPreview (wxWindow *Parent, long PreviewFlags)=0
 Function building preview for this item.
virtual void OnBuildXRCFetchingCode ()
 Default procedure generating XRC fetching code.
virtual bool OnCanAddToParent (wxsParent *Parent, bool ShowMessage)
 Checking if this item can be added to given parent.
virtual bool OnCodefExtension (wxsCodingLang Language, wxString &Result, const wxChar *&FmtChar, va_list ap)
 Extensions to Codef function.
virtual void OnEnumItemProperties (long Flags)=0
 Enumerating item properties.
virtual void OnExtraPropertyChanged (wxsPropertyGridManager *Grid, wxPGId Id)
 Reading content of extra properties.
virtual long OnGetPropertiesFlags ()
 Getting properties availability flags.
virtual wxString OnGetTreeLabel (int &Image)
 Getting name of entry in resource browser.
virtual bool OnIsPointer ()
 Function checking if this item is represented as pointer.
virtual bool OnMouseClick (wxWindow *Preview, int PosX, int PosY)
 Function processing mouse-click event.
virtual bool OnMouseDClick (wxWindow *Preview, int PosX, int PosY)
 Function processing double-click event.
virtual bool OnMouseRightClick (wxWindow *Preview, int PosX, int PosY)
 Function processing right-click event.
virtual bool OnPopup (long Id)
 Callback from popup menu.
virtual void OnPreparePopup (wxMenu *Menu)
 Function used to udpate content of popup menu.
virtual bool OnXmlRead (TiXmlElement *Element, bool IsXRC, bool IsExtra)
 Function which should load this item and child items from xrc / wxs structure.
virtual bool OnXmlWrite (TiXmlElement *Element, bool IsXRC, bool IsExtra)
 Function which should write this item and child items from xrc / wxs structure.
wxPoint Pos (wxWindow *Parent)
 Easy access to position.
void Property (wxsProperty &Prop)
 Function registering property.
wxWindow * SetupWindow (wxWindow *Window, long Flags)
 Function setting up standard widget properties after the window is created.
void ShowPopup (wxMenu *Menu)
 Showing popup menu.
wxSize Size (wxWindow *Parent)
 Easy access to size.
long Style ()
 Easy access to style (can be used directly when generating preview)
void SubContainer (wxsPropertyContainer *Container, long NewFlags)
 Function enumerating properties of other container overriding it's flags.
void SubContainer (wxsPropertyContainer &Container)
 Function enumerating properties of other container from it's reference.
void SubContainer (wxsPropertyContainer *Container)
 Function enumerating properties of other container.
void SubContainer (wxsPropertyContainer &Container, long NewFlags)
 Function enumerating properties of other container overriding it's flags.

Static Protected Attributes

static const long flPropGrid = 0x40000000
 Flag set when operating on property grid.
static const long flPropStream = 0x10000000
 Flag set when operating on property stream.
static const long flXml = 0x20000000
 Flag set when operating on xml.

Private Member Functions

void Codef (wxsCoderContext *Context, const wxChar *Fmt, wxString &Result, va_list ap)
 Internal version of Codef function.
virtual wxsQuickPropsPanelOnCreateQuickProperties (wxWindow *Parent)
 Building Quick properties panel.
virtual void OnEnumProperties (long Flags)
 Function enumerating proeprties.
virtual void OnPropertyChanged ()
 Handler for change notifications.
virtual void OnSubPropertyChanged (wxsPropertyContainer *)
 Additional handler for sub properties.
virtual void OnUpdateFlags (long &Flags)
 Updating code generation flags before building code.
void UpdateTreeLabel ()
 Updating label of this item in resource tree.

Private Attributes

wxsBaseProperties m_BaseProperties
 Pointer to base properties if item uses it.
wxsEvents m_Events
 Object managing events.
const wxsItemInfom_Info
 Pointer to item's info structure.
bool m_IsExpanded
 Set to true if corresponding node in resource tree is expanded, this value may not always be correct, it's used when recreating resource tree after change.
bool m_IsSelected
 Set to true if item is selected inside editor.
wxObject * m_LastPreview
 Current preview object.
wxsResourceItemId m_LastTreeId
 Last Tree item id generated from BuildItemTree.
 Parent class of this one.
long m_PropertiesFlags
 Properties flags.
 Data managment object containing this item.


class wxsParent

Detailed Description

Base class for all items in resource.

This class is unified interface for all items which can be used to build wxWidgets resource. These items are:

Each item has two base properties - identifier and variable name. These properties are enabled through wxsFLVariable and wxsFLId flags (declared in wxsglobals.h)

Due to some problems with calling virtual functions in constructor, Item is initialized in two steps. First, constructor and than Create function are called. Create is virtual so it could be overridden to use additional setup, but it usually won't be necessarry. In default implementation, it initializes components which are using virtual functions of wxsItem class.

Create Function is automatically called inside wxsWidgetFactory class (not wxsWidgetManager !!!), so there's no need to remember about calling that manually.

Parent of item is automatically set up when adding item to wxsParentClass using wxsParent::AddChild

Definition at line 71 of file wxsitem.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index