#include <Fl_OpBox.H>
Public Member Functions | |
| void | BringToFront () |
| Bring this box above all the others. | |
| void | CopyButtons (const Fl_OpBox &o) |
| Virtual method to handle copying buttons from one box to another. | |
| void | draw () |
| FLTK draw() method for the Fl_OpBox. | |
| Fl_OpButton * | FindButtonByLabel (const std::string &lname, std::string &errmsg) |
| Return Fl_OpButton given a button's label. | |
| Fl_OpButton * | FindButtonUnderMouse () |
| INTERNAL: See if any of this box's buttons are currently under the mouse. | |
| Fl_OpBox (const Fl_OpBox &o) | |
Fl_OpBox copy constructor. Makes a "copy" of Fl_OpBox o. | |
| Fl_OpBox (int X, int Y, int W, int H, const char *L) | |
| FLTK-style constructor for an Fl_OpBox. | |
| Fl_OpButton * | GetButton (int index) const |
Return input button for index. | |
| int | GetIndexForButton (Fl_OpButton *) const |
| Return index for an input button, or -1 if not found. | |
| int | GetIndexForInputButton (Fl_OpButton *) const |
| Return index for an input button, or -1 if not found. | |
| int | GetIndexForOutputButton (Fl_OpButton *) const |
| Return index for an output button, or -1 if not found. | |
| Fl_OpButton * | GetInputButton (int index) const |
Return input button for index. | |
| int | GetMinimumBoxHeight () const |
| Get minimum box height. | |
| int | GetMinimumButtonWidth () const |
| Get minimum button width. | |
| int | GetMinimumConnectLength () const |
| Get minimum connector length. | |
| const Fl_OpDesk * | GetOpDesk () const |
| Returns a const version of the parent Fl_OpDesk for this Fl_OpBox. | |
| Fl_OpDesk * | GetOpDesk () |
| Returns the parent Fl_OpDesk for this Fl_OpBox. | |
| Fl_OpButton * | GetOutputButton (int index) const |
Return output button for index. | |
| int | GetSelected () const |
| Get selection state for this box. | |
| int | GetTitleHeight () const |
| Return height of title bar. | |
| int | GetTotalButtons () const |
| Return the total number of buttons. | |
| int | GetTotalInputButtons () const |
| Return the total number of input buttons. | |
| int | GetTotalOutputButtons () const |
| Return the total number of output buttons. | |
| int | handle (int) |
| FLTK event handler. | |
| void | SetMinimumBoxHeight (int val) |
| Set minimum box height. | |
| void | SetMinimumButtonWidth (int val) |
| Set minimum button width. | |
| void | SetMinimumConnectLength (int val) |
| Set minimum connector length. | |
| void | SetSelected (int val) |
| Set selection state for this box. | |
| ~Fl_OpBox () | |
| Fl_OpBox's destructor. | |
Protected Member Functions | |
| void | _AddInputButton (Fl_OpButton *) |
| INTERNAL: Used by Fl_OpButton ctor/dtors. | |
| void | _AddOutputButton (Fl_OpButton *) |
| INTERNAL: Used by Fl_OpButton ctor/dtors. | |
| void | _RecalcButtonSizes () |
| INTERNAL: Recalculates button sizes, eg. | |
| void | _RemoveButton (Fl_OpButton *) |
| INTERNAL: Used by Fl_OpButton ctor/dtors. | |
Friends | |
| class | Fl_OpButton |
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
. ______________________ .
. | title | .
. |______________________| .
. | | | | .
. Fl_OpButton ---| A | | C |--- Fl_OpButton .
. | | | | .
. |___|______________|___| .
. \ .
. Fl_OpBox .
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Fl_OpBox::Fl_OpBox | ( | int | X, | |
| int | Y, | |||
| int | W, | |||
| int | H, | |||
| const char * | L | |||
| ) |
| Fl_OpBox::~Fl_OpBox | ( | ) |
Fl_OpBox's destructor.
Handles removing any connections.
| void Fl_OpBox::_AddInputButton | ( | Fl_OpButton * | but | ) | [protected] |
INTERNAL: Used by Fl_OpButton ctor/dtors.
NOT INTENDED FOR PUBLIC USE.
| void Fl_OpBox::_AddOutputButton | ( | Fl_OpButton * | but | ) | [protected] |
INTERNAL: Used by Fl_OpButton ctor/dtors.
NOT INTENDED FOR PUBLIC USE.
| void Fl_OpBox::_RecalcButtonSizes | ( | ) | [protected] |
INTERNAL: Recalculates button sizes, eg.
when a new button is added. NOT INTENDED FOR PUBLIC USE.
| void Fl_OpBox::_RemoveButton | ( | Fl_OpButton * | but | ) | [protected] |
INTERNAL: Used by Fl_OpButton ctor/dtors.
NOT INTENDED FOR PUBLIC USE.
| void Fl_OpBox::BringToFront | ( | ) |
Bring this box above all the others.
Selecting a box should do this, so that when the box(s) are moved, they don't move behind other boxes.
| void Fl_OpBox::CopyButtons | ( | const Fl_OpBox & | o | ) |
Virtual method to handle copying buttons from one box to another.
Derived classes can override this to handle copying higher level buttons from one box to another.
| Fl_OpButton * Fl_OpBox::FindButtonByLabel | ( | const std::string & | lname, | |
| std::string & | errmsg | |||
| ) |
Return Fl_OpButton given a button's label.
eg. "A1", as opposed to using its 'full name', "add_123_A1"
errmsg has reason. | const Fl_OpDesk * Fl_OpBox::GetOpDesk | ( | ) | const |
| int Fl_OpBox::GetTotalButtons | ( | ) | const |
Return the total number of buttons.
To loop through all the buttons, you can use:
for ( int t=0; t<GetTotalButtons(); t++ ) { Fl_OpButton *but = GetButton(t); // ..your code here.. }
| int Fl_OpBox::GetTotalInputButtons | ( | ) | const |
Return the total number of input buttons.
To loop through all the input buttons, you can use:
for ( int t=0; t<GetTotalInputButtons(); t++ ) { Fl_OpButton *inbut = GetInputButton(t); // ..your code here.. }
| int Fl_OpBox::GetTotalOutputButtons | ( | ) | const |
Return the total number of output buttons.
To loop through all the output buttons, you can use:
for ( int t=0; t<GetTotalOutputButtons(); t++ ) { Fl_OpButton *outbut = GetOutputButton(t); // ..your code here.. }
| int Fl_OpBox::handle | ( | int | e | ) |
FLTK event handler.
Handles dragging the box around, box selection, etc.
1.5.6