ToolMap
Loading...
Searching...
No Matches
wxTreeMultiWindowInfo Class Reference

This class contains information for every Window node to be added. More...

#include <wxTreeMultiCtrl.h>

Public Member Functions

 wxTreeMultiWindowInfo (int flags, int frontSpacing, int topSpacing)
 
int Indent (int num=1)
 
int Outdent (int num=1)
 
void SetFrontSpacing (int frontSpacing)
 
int GetFrontSpacing () const
 
void SetTopSpacing (int topSpacing)
 
int GetTopSpacing () const
 
int SetFlags (int flags)
 
int GetFlags () const
 
int AddFlag (int flag_mask)
 
int RemoveFlag (int flag_mask)
 

Detailed Description

This class contains information for every Window node to be added.

This class can be used to modify the behaviour of the Window node to be added, and can be reused to pass along upon every wxTreeMultiCtrl::AppendWindow call. For example:

MyTreeMultiCtrl->AppendWindow(item, new wxStaticText(MyTreeMultiCtrl,
-1, "Press this button"), "", wndinfo));
// now adjust the spacing of our next window to add, by indenting
// 4 times the indent size
wndinfo.Indent(4);
MyTreeMultiCtrl->AppendWindow(item, new wxButton(MyTreeMultiCtrl,
-1, "Apply"), "", wndinfo);
This class contains information for every Window node to be added.
Definition wxTreeMultiCtrl.h:357
int Indent(int num=1)
Definition wxTreeMultiCtrl.h:404

The class is created to prevent long parameter lists in the functions. Other ways to manipulate a newly added Window node are;

  • Change top spacing of the Window node to be added
  • Change front spacing (indent) of the Window node
  • Set extra flags for this Window node

Member Function Documentation

◆ AddFlag()

int wxTreeMultiWindowInfo::AddFlag ( int  flag_mask)
inline

Or's the given flag with the current flagset, and adds it. The old flag set is returned before the OR is applied.

See also
wxTreeMultiWindowInfo flags

◆ GetFlags()

int wxTreeMultiWindowInfo::GetFlags ( ) const
inline

Gets the current flags set.

See also
wxTreeMultiWindowInfo flags

◆ GetFrontSpacing()

int wxTreeMultiWindowInfo::GetFrontSpacing ( ) const
inline

Gets front spacing. This will return the current indent level set. If Indent or Outdent is used, this level represents the current Indent level.

◆ Indent()

int wxTreeMultiWindowInfo::Indent ( int  num = 1)
inline

Adds indent to original front spacing and increments it with that value (quick extra indent). The original value of FrontSpacing (see SetFrontSpacing() gets indented by multiplying the 'num' factor (default = 1) times the indent value. So if the FrontSpacing was set to 10, and Indent(2) is called, the new indent will be 30. (10 + 2 * 10). The original FrontSpacing value is remembered, so calling Outdent(2) will bring it back to 10 (30 - (2*10). Calling SetFrontSpacing with a new value, deletes the old indent.

See also
Outdent, SetFrontSpacing

◆ Outdent()

int wxTreeMultiWindowInfo::Outdent ( int  num = 1)
inline

Reduces indent a number of times, by subtracting 'num' times the original FrontSpacing value from the current FrontSpacing value (quick extra indent). Thus if the original FrontSpacing was set to 10, and the current indent value is 40, Outdent(2) will do 40 - (2 * 10) = 20

See also
Indent, SetFrontSpacing

◆ RemoveFlag()

int wxTreeMultiWindowInfo::RemoveFlag ( int  flag_mask)
inline

And's the given flag in a negated manner and removes this flag set from the current flags. The old flag set is returned.

See also
wxTreeMultiWindowInfo flags

◆ SetFlags()

int wxTreeMultiWindowInfo::SetFlags ( int  flags)
inline

Sets the current flags set, and returns previous flags state.

See also
wxTreeMultiWindowInfo flags

◆ SetFrontSpacing()

void wxTreeMultiWindowInfo::SetFrontSpacing ( int  frontSpacing)
inline

Sets FrontSpacing value. This also resets the current indent level.

◆ SetTopSpacing()

void wxTreeMultiWindowInfo::SetTopSpacing ( int  topSpacing)
inline

Sets top spacing. This means the number of pixels spacing between the last node and the next one to be added.


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