Inherits MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy >, TrueWindow, AspectBorder< SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy > >, AspectSizable< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectSelection< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectClickable< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectDblClickable< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectRightClickable< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectFont< SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy > >, AspectVisible< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectEnabled< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, AspectFocus< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, and AspectRaw< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, SmartWin::MessageMapControl< EventHandlerClass, SmartWin::WidgetTreeView< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >.
Public Types | |
typedef bool(*) | boolFunctionTakingInt (EventHandlerClass *, WidgetType *, int) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and an int returning bool. | |
typedef bool(*) | boolFunctionTakingTstring (EventHandlerClass *, WidgetType *, const SmartUtil::tstring &) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class and a const SmartUtil::tstring & returning bool. | |
typedef bool(*) | boolFunctionTakingUnsigned (EventHandlerClass *, WidgetType *, unsigned) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class pluss an unsigned int returning void. | |
typedef bool(*) | boolValidationFunc (EventHandlerClass *, WidgetType *, unsigned, unsigned, SmartUtil::tstring &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class, two unsigned int and a SmartUtil::tstring & returning bool. | |
typedef BrushPtr(*) | brushFunctionTakingCanvas (EventHandlerClass *, WidgetType *, Canvas &canvas) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class and a Canvas & returning BrushPtr. | |
typedef HRESULT(*) | hresultFunctionTakingLparamWparam (EventHandlerClass *, WidgetType *, LPARAM, WPARAM) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget, an LPARAM and a WPARAM returning HRESULT. | |
typedef int(*) | intCallbackCompareFunc (EventHandlerClass *, WidgetType *, LPARAM, LPARAM) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and two LPARAM returning int. | |
typedef bool(EventHandlerClass::*) | itsBoolFunctionTakingInt (WidgetType *, int) |
Typedef of a member function to the original class taking pointer to the this Widget and an int returning bool. | |
typedef bool(EventHandlerClass::*) | itsBoolFunctionTakingTstring (WidgetType *, const SmartUtil::tstring &) |
Typedef of a member function to the original class taking pointer to the this Widget and a const SmartUtil::tstring & returning bool. | |
typedef bool(EventHandlerClass::*) | itsBoolFunctionTakingUnsigned (WidgetType *, unsigned) |
Typedef of a member function to the original class taking pointer to the this Widget and unsigned and returning bool. | |
typedef bool(EventHandlerClass::*) | itsBoolValidationFunc (WidgetType *, unsigned, unsigned, SmartUtil::tstring &) |
Typedef of a member function to the original class taking pointer to the this Widget, two unsigned int and SmartUtil::tstring & returning bool. | |
typedef BrushPtr(EventHandlerClass::*) | itsBrushFunctionTakingCanvas (WidgetType *, Canvas &) |
Typedef of a member function to the original class taking pointer to the this Widget and a Canvas & returning BrushPtr. | |
typedef HRESULT(EventHandlerClass::*) | itsHresultFunctionTakingLparamWparam (WidgetType *, LPARAM, WPARAM) |
Typedef of a member function to the original class taking pointer to the this Widget, an LPARAM and a WPARAM returning HRESULT. | |
typedef int(EventHandlerClass::*) | itsIntLparamLparam (WidgetType *, LPARAM, LPARAM) |
Typedef of a member function to the original class taking pointer to the this Widget, two LPARAM returning int. | |
typedef void(EventHandlerClass::*) | itsVoidDrawItemFunction (WidgetType *, const DRAWITEMSTRUCT &) |
Typedef of a member function to the original class taking pointer to the this Widget and a const DRAWITEMSTRUCT & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTaking2Bool (WidgetType *, bool, bool) |
Typedef of a member function to the original class taking pointer to the this Widget and two bool returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingBool (WidgetType *, bool) |
Typedef of a member function to the original class taking pointer to the this Widget and a bool returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingCanvas (WidgetType *, Canvas &) |
Typedef of a member function to the original class taking pointer to the this Widget and a Canvas & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingConstString (WidgetType *, const SmartUtil::tstring &) |
Typedef of a member function to the original class taking pointer to the this Widget and a SmartUtil::tstring & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingInt (WidgetType *, int) |
Typedef of a member function to the original class taking pointer to the this Widget and an int returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingMouseEventResult (WidgetType *, const MouseEventResult &) |
Typedef of a member function to the original class taking pointer to the this Widget and a const MouseEventResult & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingPoint (WidgetType *, const Point &) |
Typedef of a member function to the original class taking pointer to the this Widget and const Point & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingString (WidgetType *, SmartUtil::tstring &) |
Typedef of a member function to the original class taking pointer to the this Widget and a SmartUtil::tstring & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingSystemTime (WidgetType *, const SYSTEMTIME &) |
Typedef of a member function to the original class taking pointer to the this Widget and a const SYSTEMTIME & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingUInt (WidgetType *, unsigned) |
Typedef of a member function to the original class taking pointer to the this Widget and an unsigned int returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingVoid (WidgetType *) |
Typedef of a member function to the original class taking pointer to the this Widget returning void. | |
typedef void(EventHandlerClass::*) | itsVoidFunctionTakingWindowSizedEventResult (WidgetType *, const WidgetSizedEventResult &) |
Typedef of a member function to the original class taking pointer to the this Widget and const WidgetSizedEventResult & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidGetIconFunc (WidgetType *, LPARAM, unsigned, int &) |
Typedef of a member function to the original class taking pointer to the this Widget, an unsigned int and an int & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidGetItemFunc (WidgetType *, LPARAM, unsigned, unsigned, SmartUtil::tstring &) |
Typedef of a member function to the original class taking pointer to the this Widget, two unsigned int and SmartUtil::tstring & returning void. | |
typedef void(EventHandlerClass::*) | itsVoidMeasureItemFunction (WidgetType *, MEASUREITEMSTRUCT *) |
Typedef of a member function to the original class taking pointer to the this Widget and a MEASUREITEMSTRUCT * returning void. | |
typedef void(EventHandlerClass::*) | itsVoidUnsignedUnsignedBoolCanvasRectangle (WidgetType *, unsigned, unsigned, bool, Canvas &, const SmartWin::Rectangle &) |
Typedef of a member function to the original class taking pointer to the this Widget, two unsigned int, a Canvas & and a const Rectangle & returning void. | |
typedef WidgetTreeView< EventHandlerClass, MessageMapPolicy > * | ObjectType |
Object type. | |
typedef WidgetTreeView< EventHandlerClass, MessageMapPolicy > | ThisType |
Class type. | |
typedef void(*) | voidDrawItemFunction (EventHandlerClass *, WidgetType *, const DRAWITEMSTRUCT &) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class and a const DRAWITEMSTRUCT & returning void. | |
typedef void(*) | voidFunctionTaking2Bool (EventHandlerClass *, WidgetType *, bool, bool) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and two bool returning void. | |
typedef void(*) | voidFunctionTakingBool (EventHandlerClass *, WidgetType *, bool) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a bool returning void. | |
typedef void(*) | voidFunctionTakingCanvas (EventHandlerClass *, WidgetType *, Canvas &) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class and a Canvas & returning void. | |
typedef void(*) | voidFunctionTakingConstString (EventHandlerClass *, WidgetType *, const SmartUtil::tstring &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a SmartUtil::tstring & returning void. | |
typedef void(*) | voidFunctionTakingInt (EventHandlerClass *, WidgetType *, int) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and an int returning void. | |
typedef void(*) | voidFunctionTakingMouseEventResult (EventHandlerClass *, WidgetType *, const MouseEventResult &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a const MouseEventResult & returning void. | |
typedef void(*) | voidFunctionTakingPoint (EventHandlerClass *, WidgetType *, const Point &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a const Point & returning void. | |
typedef void(*) | voidFunctionTakingString (EventHandlerClass *, WidgetType *, SmartUtil::tstring &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a SmartUtil::tstring & returning void. | |
typedef void(*) | voidFunctionTakingSystemTime (EventHandlerClass *, WidgetType *, const SYSTEMTIME &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a const SYSTEMTIME & returning void. | |
typedef void(*) | voidFunctionTakingUInt (EventHandlerClass *, WidgetType *, unsigned) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and an unsigned int returning void. | |
typedef void(*) | voidFunctionTakingVoid (EventHandlerClass *, WidgetType *) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class returning void. | |
typedef void(*) | voidFunctionTakingWindowSizedEventResult (EventHandlerClass *, WidgetType *, const WidgetSizedEventResult &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class and a const WidgetSizedEventResult & returning void. | |
typedef void(*) | voidGetIconFunc (EventHandlerClass *, WidgetType *, LPARAM, unsigned, int &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class, an LPARAM, an unsigned int and an int & returning void. | |
typedef void(*) | voidGetItemFunc (EventHandlerClass *, WidgetType *, LPARAM, unsigned, unsigned, int &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class, an LPARAM, two unsigned int and a SmartUtil::tstring & returning void. | |
typedef void(*) | voidMeasureItemFunction (EventHandlerClass *, WidgetType *, MEASUREITEMSTRUCT *) |
Typedef of a static/global function taking a pointer to the original class and a pointer to the this Widget class and a MEASUREITEMSTRUCT * returning void. | |
typedef void(*) | voidUnsignedUnsignedBoolCanvasRectangle (EventHandlerClass *, WidgetType *, unsigned, unsigned, bool, Canvas &, const SmartWin::Rectangle &) |
Typedef of a static/global function taking a pointer to the original class, a pointer to the this Widget class, two unsigned int, a bool, a Canvas & and a const Rectangle & returning void. | |
Public Member Functions | |
void | addRemoveExStyle (DWORD addStyle, bool add) |
Use this function to add or remove windows exStyles. | |
void | addRemoveStyle (DWORD addStyle, bool add) |
Use this function to add or remove windows styles. | |
void | bringToBottom () |
Brings the widget to the bottom. | |
void | bringToFront () |
Brings the widget to the front. | |
virtual void | create (const Seed &cs=getDefaultSeed()) |
Actually creates the TreeView. | |
void | DeleteAllItems () |
Deletes every node in the tree. | |
void | deleteChildrenOfNode (const TreeViewNode &node) |
Deletes just the children of a "node" from the TreeView< br >. | |
void | deleteNode (const TreeViewNode &node) |
Deletes a "node" and its children from the TreeView< br >. | |
void | editLabel (const TreeViewNode &node) |
Edits the label of the "node". | |
void | ensureVisible (const TreeViewNode &node) |
Ensures that the node is visible. | |
Rectangle | getBounds () const |
Returns the position and size of the window. | |
Point | getClientAreaSize () const |
Returns the size of the client area of the window. | |
Utilities::CriticalSection & | getCriticalSection () |
Returns a CriticalSection associated with the current Widget object. | |
HMENU | getCtrlId () const |
Returns the control id of the Widget. | |
bool | getEnabled () const |
Retrieves the enabled property of the Widget. | |
bool | getFocus () const |
Retrieves the focus property of the Widget. | |
FontPtr | getFont () |
Returns the font used by the Widget. | |
bool | getNode (const TreeViewNode &node, unsigned flag, TreeViewNode &resultNode) |
Returns the node with a relationship in flags to the specified node. | |
Widget * | getParent () const |
Returns the parent Widget of the Widget. | |
Point | getPosition () const |
Returns the position of the window. | |
virtual int | getSelectedIndex () const |
Returns the param of the current selected node. | |
SmartUtil::tstring | getSelectedItemText () |
Returns the text of the current selected node. | |
Point | getSize () const |
Returns the size of the window. | |
SmartUtil::tstring | getText (const TreeViewNode &node) |
Returns the text of a particular node. | |
Point | getTextSize (const SmartUtil::tstring &text) |
Fills a Point with the size of text to be drawn in the Widget's font. | |
bool | getVisible () const |
Retrieves the visible property of the Widget. | |
HWND | handle () const |
Returns the HWND to the Widget. | |
TreeViewNode | insertNode (const SmartUtil::tstring &text, const TreeViewNode &parent=TreeViewNode(), unsigned param=0, int iconIndex=-1, int selectedIconIndex=-1) |
Inserts a "node" into the TreeView. | |
void | invalidateWidget () |
Add this widget to the update area. | |
void | maximize () |
Maximize your window. | |
void | minimize () |
Minimize your window. | |
void | onClicked (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Setting the event handler for the "clicked" event. | |
void | onDblClicked (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Setting the event handler for the "Double Clicked" event. | |
void | onEnabled (typename MessageMapType::itsVoidFunctionTakingBool eventHandler) |
Setting the event handler for the "enabled" event. | |
void | onFocus (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Sets the event handler for what function to be called when control loses focus. | |
void | onKillFocus (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Sets the event handler for what function to be called when control loses focus. | |
void | onMoved (typename MessageMapType::itsVoidFunctionTakingPoint eventHandler) |
void | onRaw (typename MessageMapType::itsHresultFunctionTakingLparamWparam eventHandler, const Message &msg) |
Setting the member event handler for a "raw" event. | |
void | onRightClicked (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Setting the event handler for the "Right Clicked" event. | |
void | onSelectionChanged (typename MessageMapType::itsVoidFunctionTakingVoid eventHandler) |
Setting the event handler for the "selection changed" event. | |
void | onSized (typename MessageMapType::itsVoidFunctionTakingWindowSizedEventResult eventHandler) |
void | onValidateEditLabels (typename MessageMapType::itsBoolFunctionTakingTstring eventHandler) |
Sets the event handler for what function to be called when a label is edited. | |
void | onVisibilityChanged (typename MessageMapType::itsVoidFunctionTakingBool eventHandler) |
Setting the event handler for the "visible" event. | |
void | restore () |
Restores your window. | |
virtual LRESULT | sendWidgetMessage (HWND hWnd, UINT msg, WPARAM &wPar, LPARAM &lPar) |
Send a message to the Widget. | |
void | setBorder (bool value=true) |
Set or remove the simple border (solid line). | |
void | setBounds (int x, int y, int width, int height, bool updateWindow=true) |
Sets the new size and position of the window. | |
void | setBounds (const Point &newPos, const Point &newSize, bool updateWindow=true) |
Sets the new size and position of the window. | |
void | setBounds (const Rectangle &rect, bool updateWindow=true) |
Sets the new size and position of the window. | |
void | setEditLabels (bool value=true) |
Allows the user to edit the labels of tree - view items. | |
void | setEnabled (bool enabled) |
Sets the enabled property of the Widget. | |
void | setFocus () |
Gives the Widget the keyboard focus. | |
void | setFont (PredefinedFontTypes stockObjectFont, bool forceUpdate=true) |
Function taking a PredefinedFontTypes type. | |
void | setFont (FontPtr font, bool forceUpdate=true) |
Sets the font used by the Widget. | |
void | setFullRowSelect (bool value=true) |
Enables full - row selection in the tree view. | |
void | setHasButtons (bool value=true) |
Adds a plus/minus sign in front of items. | |
void | setHasLines (bool value=true) |
Adds lines in front of items. | |
void | setLinesAtRoot (bool value=true) |
Adds lines in front of the root item. | |
void | setNormalImageList (ImageListPtr normalImageList) |
Set the normal image list for the Tree View. | |
void | setPositionPerPlace (SmartWin::Place &bound) |
Given a bounding Place class, place this Widget and adjust to the next position. | |
void | setRaisedBorder (bool value=true) |
Set or remove the raised border (like in buttons). | |
virtual void | setSelectedIndex (int idx) |
Sets the currently selected node. | |
void | setSizeAsCol (const Rectangle &rect, int rows, int rownum, int border=0, bool updateWindow=true) |
Given a bounding rectangle with rows, put this Widget in the rownum position. | |
void | setSizeAsGridPerPlace (SmartWin::Place &bound, int rows, int cols) |
this Widget in the next cell. | |
void | setSizeAsRow (const Rectangle &rect, int cols, int colnum, int border=0, bool updateWindow=true) |
Given a bounding rectangle with cols, put this Widget in the colnum position. | |
void | setSizePerTextPerPlace (SmartWin::Place &bound, const SmartUtil::tstring &text, int extraX=0, int extraY=0) |
Place after sizing for the Widget's text, and adjust to the next position. | |
void | setSmoothSunkenBorder (bool value=true) |
Set or remove the smooth sunken border (generally used in read only text boxes). | |
void | setStateImageList (ImageListPtr stateImageList) |
Set the state image list for the Tree View. | |
void | setSunkenBorder (bool value=true) |
Set or remove the sunken border (like in text box widgets). | |
void | setTrackSelect (bool value=true) |
Add Track Selection to the Tree View Control. | |
void | setVisible (bool visible) |
Sets the visibility property of the Widget. | |
virtual void | subclass (unsigned id) |
Subclasses the dialog item with the given dialog item id. | |
void | updateWidget () |
Repaints the whole window. | |
Static Public Member Functions | |
static const Seed & | getDefaultSeed () |
Default values for creation. | |
static Point | getDesktopSize () |
Returns the screen size. | |
Protected Member Functions | |
void | createMessageMap () |
make the Windows Message Procedure dispatching map right. | |
Classes | |
class | Seed |
Seed class. More... |
You can either inherit from this class or add an instance of this class into your WidgetWindow inherited class.
If you inherit from the class you should explicitly call create e.g. in the CTOR of you class.
If you instantiate it directly (through the class Widget) you should create it by calling WidgetFactory::createxxx where xxx equals the name of the class WITHOUT the Widget part.
void addRemoveExStyle | ( | DWORD | addStyle, | |
bool | add | |||
) | [inherited] |
Use this function to add or remove windows exStyles.
The first parameter is the type of style you wish to add/remove.
The second argument is a boolean indicating if you wish to add or remove the style (if true add style, else remove)
void addRemoveStyle | ( | DWORD | addStyle, | |
bool | add | |||
) | [inherited] |
Use this function to add or remove windows styles.
The first parameter is the type of style you wish to add/remove.
The second argument is a boolean indicating if you wish to add or remove the style (if true add style, else remove)
void bringToBottom | ( | ) | [inherited] |
Brings the widget to the bottom.
Makes the widget become the bottom most widget meaning it will be obscured by all other widgets which are contained in the same container widget.
For instance if you have two widgets which partially hides eachother and you call bringToBottom on one of them it will make sure that the widget you call bringToBottom on will be the one which will be invisible and the other one will be all visible by the parts which are obscured by the this widget.
void bringToFront | ( | ) | [inherited] |
Brings the widget to the front.
Makes the widget become the front most widget meaning it will not be obscured by other widgets which are contained in the same container widget.
For instance if you have two widgets which partially hides eachother and you call bringToFront on one of them it will make sure that the widget you call bringToFront on will be the one which will be all visible and the other one will be partially hidden by the parts which are obscured by the this widget.
void create | ( | const Seed & | cs = getDefaultSeed() |
) | [virtual] |
Actually creates the TreeView.
You should call WidgetFactory::createTreeView if you instantiate class directly.
Only if you DERIVE from class you should call this function directly.
void DeleteAllItems | ( | ) |
Deletes every node in the tree.
Every node and all of its children are deleted.
void deleteChildrenOfNode | ( | const TreeViewNode & | node | ) |
Deletes just the children of a "node" from the TreeView< br >.
Cycles through all the children of node, and deletes them.
The node itself is preserved.
void deleteNode | ( | const TreeViewNode & | node | ) |
Deletes a "node" and its children from the TreeView< br >.
The node and all of its children are deleted.
void editLabel | ( | const TreeViewNode & | node | ) |
Edits the label of the "node".
The label of the node is put to edit modus. The node edited must be visible.
void ensureVisible | ( | const TreeViewNode & | node | ) |
Ensures that the node is visible.
Nodes may not be visible if they are indicated with a + , or do not appear in the window due to scrolling.
Rectangle getBounds | ( | ) | const [inherited] |
Returns the position and size of the window.
Note that this is in screen coordinates meaning the position returned is relative to the upper left corner of the desktop screen, the function also returns in the size member of the Rectangle the size of the window and not the position of the lower right point. Values includes borders, frames and toolbar etc of the window.
Point getClientAreaSize | ( | ) | const [inherited] |
Returns the size of the client area of the window.
This differs from getSize because it disregards the border and headers, this function only returns the client area of the Widget meaning the area which it is possible to draw on.
Utilities::CriticalSection & getCriticalSection | ( | ) | [inherited] |
Returns a CriticalSection associated with the current Widget object.
If you need serialized thread safe access to the Widget call this function and either stuff the returned object into a Utilities::ThreadLock or call Utilities::CriticalSection::lock (then you manually have to ensure CriticalSection::unlock is called on it)
HMENU getCtrlId | ( | ) | const [inherited] |
Returns the control id of the Widget.
This one only makes sense for control items, e.g. WidgetButton, WidgetComboBox etc.
Every control in a Widget has got its own control ID, mark that for a WidgetWindow this will always be ZERO
Point getDesktopSize | ( | ) | [static, inherited] |
Returns the screen size.
This is the screen size, and useful for making applications that must adapt to different screen sizes.
bool getEnabled | ( | ) | const [inherited] |
bool getFocus | ( | ) | const [inherited] |
FontPtr getFont | ( | ) | [inherited] |
bool getNode | ( | const TreeViewNode & | node, | |
unsigned | flag, | |||
TreeViewNode & | resultNode | |||
) |
Returns the node with a relationship in flags to the specified node.
The node specified comes from insertNode< br > Flag definitions : < br > TVGN_CARET...........Retrieves the currently selected item.< br > TVGN_CHILD...........Retrieves the first child node of the specified node.< br > TVGN_DROPHILITE......Retrieves the target mode of a drag - and - drop operation.< br > TVGN_FIRSTVISIBLE....Retrieves the first visible node. TVGN_NEXT............Retrieves the next sibling node. ( TVGN_CHILD is the first )< br > TVGN_NEXTVISIBLE.....Retrieves the next visible node after the specified node.< br > TVGN_PARENT..........Retrieves the parent of the specified node.< br > TVGN_PREVIOUS........Retrieves the previous sibling node.< br > TVGN_PREVIOUSVISIBLE.Retrieves the first visible node that precedes the specified node.< br > TVGN_ROOT............Retrieves the topmost or very first node of the tree - view control.< br >
Widget* getParent | ( | ) | const [inherited] |
Point getPosition | ( | ) | const [inherited] |
Returns the position of the window.
Note that this is in screen coordinates meaning the position returned is relative to the upper left corner of the desktop screen.
Reimplemented in WidgetProgressBar, and WidgetSlider.
int getSelectedIndex | ( | ) | const [virtual] |
Returns the param of the current selected node.
The return value is a unique application defined unsigned number ( optionally ) given when inserting nodes.
Note!
It is pointless calling this function if no param was given when inserting the nodes.
0 is special case indicating failure
Implements AspectSelection.
SmartUtil::tstring getSelectedItemText | ( | ) |
Returns the text of the current selected node.
Returns the text of the current selected node in the tree view.
Point getSize | ( | ) | const [inherited] |
Returns the size of the window.
Includes the border, frame and toolbar etc of the window.
SmartUtil::tstring getText | ( | const TreeViewNode & | node | ) |
Returns the text of a particular node.
Returns the text of a particular node.
Point getTextSize | ( | const SmartUtil::tstring & | text | ) | [inherited] |
Fills a Point with the size of text to be drawn in the Widget's font.
getTextSize determines the height and width that text will take.
This is useful if you want to allocate enough space to fit known text.
It accounts for the set font too.
bool getVisible | ( | ) | const [inherited] |
HWND handle | ( | ) | const [inherited] |
TreeViewNode insertNode | ( | const SmartUtil::tstring & | text, | |
const TreeViewNode & | parent = TreeViewNode() , |
|||
unsigned | param = 0 , |
|||
int | iconIndex = -1 , |
|||
int | selectedIconIndex = -1 | |||
) |
Inserts a "node" into the TreeView.
The return value from a call to this function is a Node.
If you later wish to inserts CHILDREN to that node, pass the return value from the first call as the second parameter into this function.
If you wish to insert a ( a TreeView can have several "root" nodes ) "root" node then don't pass anything as the second parameter. ( or pass Node() )
The "param" parameter ( optionally ) is a unique unsigned integer which must be higher than 0 and can later be used to retrieve unique identification of which item was e.g. selected etc...
Especially useful when text of nodes is not unique or text might change. The "iconIndex" optionally specifies the icon index of the item in the associated image list, if there is one.
The "selectedIconIndex" optionally specifies the icon index of the item in the selected state (if not specified or -1, it defaults to the iconIndex)
void invalidateWidget | ( | ) | [inherited] |
Add this widget to the update area.
Same as updateWidget except that this does not force an immediate redraw.
void maximize | ( | ) | [inherited] |
Maximize your window.
This will make the window fill the whole area that the window has available.
This function cannot be called for any Widget types other than those derived from WidgetWindowBase.
void minimize | ( | ) | [inherited] |
Minimize your window.
This will make the window become minimized.
This function cannot be called for any Widget types other than those derived from WidgetWindowBase.
void onRaw | ( | typename MessageMapType::itsHresultFunctionTakingLparamWparam | eventHandler, | |
const Message & | msg | |||
) | [inherited] |
Setting the member event handler for a "raw" event.
Sets the event handler for the "raw" event handler. Use this if any of the predefined Event Handlers are not powerful enough or if you can't find the specific Event Handler you need.
Note!
This works in a special way. Unless you add the same Message twice, it will add that Event Handler and not remove the previous one. You can have "multiple" raw Event Handlers as long as the Message is not the same!
Note also!
This is an UNTYPED Event!
If there are other events which will handle the message, USE THOSE instead of this one!!!
This is a "last resort" event type.
Two parameters are passed: LPARAM and WPARAM
Return value is HRESULT which will be passed on to the System
void restore | ( | ) | [inherited] |
Restores your window.
This will make the window become restored.
This function cannot be called for any Widget types other than those derived from WidgetWindowBase.
LRESULT sendWidgetMessage | ( | HWND | hWnd, | |
UINT | msg, | |||
WPARAM & | wPar, | |||
LPARAM & | lPar | |||
) | [virtual] |
Send a message to the Widget.
If you need to be able to send a message to a Widget then use this function as it will unroll into
a SendMessage from the Windows API
Reimplemented from MessageMapControl.
void setBounds | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height, | |||
bool | updateWindow = true | |||
) | [inherited] |
Sets the new size and position of the window.
x is the new horizontal position of your window.
y is the new vertical position of your window.
width is the new width and height is the new height of your window.
Zenith is as in all other bounds function top/left.
A call to this function will (probably) also MOVE your Widget too.
void setBounds | ( | const Rectangle & | rect, | |
bool | updateWindow = true | |||
) | [inherited] |
void setEditLabels | ( | bool | value = true |
) |
Allows the user to edit the labels of tree - view items.
Note that if the onValidate event handler is defined it will override this function no matter what
void setEnabled | ( | bool | enabled | ) | [inherited] |
void setFocus | ( | ) | [inherited] |
void setFont | ( | PredefinedFontTypes | stockObjectFont, | |
bool | forceUpdate = true | |||
) | [inherited] |
Function taking a PredefinedFontTypes type.
Examples are SystemFixedFont, SystemFont or DefaultGuiFont. -- credit to mm.
void setFont | ( | FontPtr | font, | |
bool | forceUpdate = true | |||
) | [inherited] |
void setFullRowSelect | ( | bool | value = true |
) |
Enables full - row selection in the tree view.
The entire row of the selected item is highlighted, and clicking anywhere on an item's row causes it to be selected.
This style is mutually exclusive with setHasLines and setLinesAtRoot
void setHasButtons | ( | bool | value = true |
) |
Adds a plus/minus sign in front of items.
To add items also at the root node call setLinesAtRoot
void setHasLines | ( | bool | value = true |
) |
Adds lines in front of items.
To set lines in front of also the root item call setLinesAtRoot.
void setLinesAtRoot | ( | bool | value = true |
) |
Adds lines in front of the root item.
Is ignored if you don't also call setHasLines.
void setNormalImageList | ( | ImageListPtr | normalImageList | ) |
Set the normal image list for the Tree View.
normalImageList is the image list that contains the images for the selected and nonselected item icons.
void setPositionPerPlace | ( | SmartWin::Place & | bound | ) | [inherited] |
Given a bounding Place class, place this Widget and adjust to the next position.
This function places the Widget into the bounding rectangle specified by bound.
The size of the Widget is preserved.
The Widgets are sized and placed from left to right until a row is full, and then continues with the next row.
The internal position of bound is updated.
void setSelectedIndex | ( | int | idx | ) | [virtual] |
Sets the currently selected node.
The parameter given is the param given when inserting the nodes
Note!
It is pointless calling this function if no param was given when inserting the nodes.
Implements AspectSelection.
void setSizeAsCol | ( | const Rectangle & | rect, | |
int | rows, | |||
int | rownum, | |||
int | border = 0 , |
|||
bool | updateWindow = true | |||
) | [inherited] |
Given a bounding rectangle with rows, put this Widget in the rownum position.
The rect defines a column made up of a number of rows. The rownum specifies a zero based index of the row to place the Widget. [ row0 ]
[ row1 ]
...
[ rownum ]
[ ]
Of course you could just generate a new bounding rectangle, but this is easier.
void setSizeAsGridPerPlace | ( | SmartWin::Place & | bound, | |
int | rows, | |||
int | cols | |||
) | [inherited] |
this Widget in the next cell.
Bound determines the bounding rectangle, and borders.
rows and cols determine the size and position of each cell.
The internal position of bound is updated.
The Widgets are sized and placed according to the current cell, from left to right until a row is full, and then continues with the next row.
void setSizeAsRow | ( | const Rectangle & | rect, | |
int | cols, | |||
int | colnum, | |||
int | border = 0 , |
|||
bool | updateWindow = true | |||
) | [inherited] |
void setSizePerTextPerPlace | ( | SmartWin::Place & | bound, | |
const SmartUtil::tstring & | text, | |||
int | extraX = 0 , |
|||
int | extraY = 0 | |||
) | [inherited] |
Place after sizing for the Widget's text, and adjust to the next position.
This function places the Widget into the bounding rectangle specified by bound.
The idea is that the size of certain Widgets should really be large enough to show their text. Buttons and text areas are examples.
The size of the Widget is calculated from the size of getText().
It is optionally adjusted by the extraX and extraY.
The Widgets are sized and placed from left to right until a row is full, and then continues with the next row.
The internal position of bound is updated.
void setStateImageList | ( | ImageListPtr | stateImageList | ) |
Set the state image list for the Tree View.
stateImageList is the image list that contains the images for the item states.
void setTrackSelect | ( | bool | value = true |
) |
Add Track Selection to the Tree View Control.
Pass true to let the Tree View Control go into Track Selction modus which is quite a neat visual style.
void setVisible | ( | bool | visible | ) | [inherited] |
void subclass | ( | unsigned | id | ) | [virtual, inherited] |
Subclasses the dialog item with the given dialog item id.
Subclasses a dialog item, the id is the dialog item id from the resource editor.
Should normally not be called directly but rather called from e.g. one of the creational functions found in the WidgetFactory class.
void updateWidget | ( | ) | [inherited] |
Repaints the whole window.
Invalidate the window and repaints it.