Fl_OpDesk
Fl_OpConnect Class Reference

This encapsulates a single connection between two buttons. More...

#include <Fl_OpConnect.H>

List of all members.

Public Member Functions

int AreConnected (Fl_OpButton *a, Fl_OpButton *b)
 Are the two buttons a and b the ones we're connecting?
void CopyAttributes (Fl_OpConnect *old)
 Copy the attributes (color, width, etc) from old connection to the current.
 Fl_OpConnect (Fl_OpButton *a, Fl_OpButton *b)
 Fl_OpConnect constructor. Establishes a connection between buttons a and b.
 Fl_OpConnect (const Fl_OpConnect &o)
 Copy constructor.
Fl_Color GetColor () const
 Get the color of this connection's line(s).
Fl_OpButtonGetDstButton () const
 Return destination button.
Fl_OpButtonGetSrcButton () const
 Return the source button.
int GetWidth () const
 Get the line width (thickness) of this connection's line(s).
int IsButtonConnected (Fl_OpButton *find)
 See if button find is one of the buttons we're connected to.
void operator= (const Fl_OpConnect &o)
 Assignment operator, assigning one Fl_OpConnect to another.
void SetColor (Fl_Color val)
 Set the color of this connection's line(s).
void SetWidth (int val)
 Set the line width (thickness) for this connection's line(s).

Detailed Description

This encapsulates a single connection between two buttons.

This implements a connection beween one output button of an opbox, and one input button of another opbox. For connections from one button to many, use multiple instances of Fl_OpConnect for each separate connection.

The Fl_OpDesk keeps an array of these, so it can keep track of all connections for the purposes of drawing, and for the application to be able to easily loop through for code generation purposes.


Member Function Documentation

int Fl_OpConnect::AreConnected ( Fl_OpButton a,
Fl_OpButton b 
) [inline]

Are the two buttons a and b the ones we're connecting?

Returns:
1 if we show them connected, 0 if not.
int Fl_OpConnect::IsButtonConnected ( Fl_OpButton find) [inline]

See if button find is one of the buttons we're connected to.

Returns:
1 if it's connected, 0 if not.

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