FBButton Class Reference

#include <fbcontrols.h>
FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton FBButton
Inheritance diagram for FBButton:
Inheritance graph
[legend]

List of all members.


Detailed Description

Used to create and manage buttons in a user interface.

This class includes functionality to create buttons in a user interface and add a callback. In MotionBuilder, buttons are created within regions, which are in turn created in layouts with FBLayout. For usage, see the Python sample Button.py. See also: FBButtonStyle, FBTextJustify, FBButtonLook.

Definition at line 1049 of file fbcontrols.h.


Public Member Functions

  FBButton ()
  Constructor.
FBColor  GetStateColor (FBButtonState pState)
  Queries the color associated with a button state.
void  SetStateColor (FBButtonState pState, const FBColor &pColor)
  Returns whether or not the item pIndex is currently selected.
void  SetImageFileNames (const char *pUpImage, const char *pDownImage=0, const char *pThirdImage=0)
  Sets the image used to generate a kFBBitmap2States.
void  HookToButton (FBButton *pButton)
  Sets a link to another button.

Public Attributes

FBPropertyInt  State
  Read Write Property: Current state of button.
FBPropertyButtonStyle  Style
  Read Write Property: Button style.
FBPropertyTextJustify  Justify
  Read Write Property: Current state of button.
FBPropertyButtonLook  Look
  Read Write Property: Current state of button.
FBPropertyEvent  OnClick
  Event: Button clicked.
FBPropertyEvent  OnDragAndDrop
  Event: Something was dragged.

Constructor & Destructor Documentation

FBButton (  ) 

Constructor.


Member Function Documentation

FBColor GetStateColor ( FBButtonState  pState  ) 

Queries the color associated with a button state.

This method is only useful for buttons of style kFB2States.

Parameters:
pState  The state to be queried.
Returns:
The color vector.

void SetStateColor ( FBButtonState  pState,
const FBColor pColor  
)

Returns whether or not the item pIndex is currently selected.

Parameters:
pState  The state to be set.
pColor  The desired color vector.

void SetImageFileNames ( const char *  pUpImage,
const char *  pDownImage = 0,
const char *  pThirdImage = 0  
)

Sets the image used to generate a kFBBitmap2States.

Parameters:
pUpImage  The image used when button is unpushed
pDownImage  The image used when button is pushed
pThirdImage 

void HookToButton ( FBButton pButton  ) 

Sets a link to another button.

Parameters:
pButton  Target button

Member Data Documentation

FBPropertyInt State

Read Write Property: Current state of button.

Definition at line 1080 of file fbcontrols.h.

FBPropertyButtonStyle Style

Read Write Property: Button style.

Definition at line 1081 of file fbcontrols.h.

FBPropertyTextJustify Justify

Read Write Property: Current state of button.

Definition at line 1082 of file fbcontrols.h.

FBPropertyButtonLook Look

Read Write Property: Current state of button.

Definition at line 1083 of file fbcontrols.h.

FBPropertyEvent OnClick

Event: Button clicked.

Definition at line 1085 of file fbcontrols.h.

FBPropertyEvent OnDragAndDrop

Event: Something was dragged.

Definition at line 1086 of file fbcontrols.h.


Please send us your comments about this page.