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













SourceForge.net Logo

Option

 

class Option : public Pusher

 

 

Widget providing the selection of 2 or alternatively 3 states (true, false, Null). Value of Option is either 0, 1, or Null. When setting Value to Option, string "1" is interpreted as true state, other non-Null strings as false. Depending on whether Option is in NotNull mode, Null is interpreted as false or Null state. 0 is always interpreted as false, Null number as either Null (NotNull mode) or false (NoNotNull mode), other numbers as true.

 

Derived from Pusher

 

 

Constructor Detail

 

Option()

Initializes Option into NotNull, 2-state mode, false value and standard appearance.

 


 

~Option()

Default destructor.

 

 

Public Method List

 

Option& Set(int b)

Sets Option to the specified state (0, 1 or Null).

b

State.

 


 

int Get() const

Return value

Current state of Option.

 


 

operator int() const

Return value

Get()

 


 

void operator=(int b)

Same as Set(b).

b

State.

 


 

Option& BlackEdge(bool b = true)

Activates visual appearance suitable for placing Option on white background (SColorPaper), like in list, as opposed to default representation suitable for placing it on dialog (SColorFace).

b

true to activate.

Return value

*this for chaining.

 


 

bool IsBlackEdge() const

Returns true if BlackEdge is active.

 


 

Option& SwitchImage(bool b = true)

Activates visual representation that paints the Option with the Switch appearance.

 


 

bool IsSwitchImage() const

Returns true if SwitchImage is active.

 


 

Option& ThreeState(bool b = true)

Activates three-state mode. Also activates NoNotNull mode.

 


 

bool IsThreeState() const

Returns true if ThreeState is active.

 


 

Option& NotNull(bool nn = true)

Activates NotNull mode - Null Value assigned to Option (via SetData) is interpreted as false.

 


 

Option& NoNotNull()

Activates NoNotNull mode - Null Value assigned to Option is interpreted as Null.

Return value

*this for chaining.

 


 

bool IsNotNull() const

Returns true if NotNull is active.

 


 

Option& SetColor(Color c)

Sets the color of text of Option label. Setting Null restores the default color.

 


 

Option& ShowLabel(bool b = true)

Toggles the display of the option's label.

 


 

bool IsShowLabel() const

Returns true if ShowLabel is active.

 

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