Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

BarCtrl

 

class BarCtrl : public Bar, public CtrlFrame

This class provides common methods for MenuBar and ToolBar. Derived from Bar, it adds support for widget placement as frame and status help line.

 

 

Public Member List

 

Callback1<const String&> WhenHelp

This callback is called when SendHelpLine or ClearHelpLine static methods request displaying the status help line. Thanks to operator overload, this callback can be directly assigned the StatusBar instance.

 


 

Callback WhenLeftClick

Called when user clicks on bar area.

 


 

static BarCtrl *GetBarCtrlParent(Ctrl *child)

Returns the first parent of BarCtrl type for child.

 


 

static void SendHelpLine(Ctrl *q)

If q has help line defined (using Ctrl::HelpLine method), sends it to the CtrlBar obtained by calling GetBarCtrlParent (if any) WhenHelp callback.

 


 

static void ClearHelpLine(Ctrl *q)

Sends empty String to the CtrlBar obtained by calling GetBarCtrlParent (if any) WhenHelp callback.

 


 

BarCtrl& Align(int align)

Sets the placement of bar when used as frame, align can be one of BarCtrl::BAR_BOTTOM, BarCtrl::BAR_TOP, BarCtrl::BAR_RIGHT, BarCtrl::BAR_LEFT. Default value is BAR_TOP.

 


 

BarCtrl& Top()

Same as Align(BAR_TOP).

 


 

BarCtrl& Bottom()

Same as Align(BAR_BOTTOM).

 


 

BarCtrl& Left()

Same as Align(BAR_LEFT).

 


 

BarCtrl& Right()

Same as Align(BAR_RIGHT).

 


 

int GetAlign() const

Returns current Align setting.

 


 

BarCtrl& Wrap(int q = 1)

Sets the line (or column for vertical bars) wrap mode. 1 - wrap mode is active, 0 - wrap is active for frame BarCtrl, -1 - wrap mode is not active. Default is 0 (active in frame).

 


 

BarCtrl& NoWrap()

Same as Wrap(-1).

 

 

Last edit by cxl on 12/02/2017. Do you want to contribute?. T++