|  |  |  | Mx Toolkit Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Known Implementations | ||||
enum MxFocusDirection; enum MxFocusHint; MxFocusable; struct MxFocusableIface; MxFocusable * mx_focusable_move_focus (MxFocusable *focusable,MxFocusDirection direction,MxFocusable *from); MxFocusable * mx_focusable_accept_focus (MxFocusable *focusable,MxFocusHint hint); MxFocusHint mx_focus_hint_from_direction (MxFocusDirection direction);
MxFocusable is implemented by MxBin, MxBoxLayout, MxButton, MxComboBox, MxDialog, MxEntry, MxExpander, MxFrame, MxItemView, MxKineticScrollView, MxListView, MxMenu, MxNotebook, MxOffscreen, MxPathBar, MxScrollBar, MxScrollView, MxSlider, MxStack, MxTable, MxToolbar and MxViewport.
typedef enum {
  MX_FOCUS_DIRECTION_OUT,
  MX_FOCUS_DIRECTION_UP,
  MX_FOCUS_DIRECTION_DOWN,
  MX_FOCUS_DIRECTION_LEFT,
  MX_FOCUS_DIRECTION_RIGHT,
  MX_FOCUS_DIRECTION_NEXT,
  MX_FOCUS_DIRECTION_PREVIOUS
} MxFocusDirection;
typedef enum {
  MX_FOCUS_HINT_FIRST,
  MX_FOCUS_HINT_LAST,
  MX_FOCUS_HINT_PRIOR,
  MX_FOCUS_HINT_FROM_ABOVE,
  MX_FOCUS_HINT_FROM_BELOW,
  MX_FOCUS_HINT_FROM_LEFT,
  MX_FOCUS_HINT_FROM_RIGHT
} MxFocusHint;
typedef struct _MxFocusable MxFocusable;
This is an opaque structure whose members cannot be directly accessed.
struct MxFocusableIface {
  GObjectClass parent_class;
  MxFocusable* (*accept_focus) (MxFocusable *focusable,
                                MxFocusHint  hint);
  MxFocusable* (*move_focus)   (MxFocusable      *focusable,
                                MxFocusDirection  direction,
                                MxFocusable      *from);
};
MxFocusable * mx_focusable_move_focus (MxFocusable *focusable,MxFocusDirection direction,MxFocusable *from);
Move the focus
| 
 | A MxFocusable | 
| 
 | A MxFocusDirection | 
| 
 | focusable to move the focus from | 
| Returns : | the newly focused focusable. [transfer none] | 
MxFocusable * mx_focusable_accept_focus (MxFocusable *focusable,MxFocusHint hint);
Accept the focus
| 
 | A MxFocusable | 
| 
 | A MxFocusHint | 
| Returns : | the focusable. [transfer none] | 
MxFocusHint         mx_focus_hint_from_direction        (MxFocusDirection direction);
Transforms a focus direction to a focus hint. This is a convenience
function for actors that implement the MxFocusable interface, to
pass the correct MxFocusHint to their children when calling
mx_focusable_accept_focus().
MX_FOCUS_DIRECTION_UP maps to MX_FOCUS_HINT_FROM_BELOW,
MX_FOCUS_DIRECTION_DOWN maps to MX_FOCUS_HINT_FROM_ABOVE,
MX_FOCUS_DIRECTION_LEFT maps to MX_FOCUS_HINT_FROM_RIGHT,
MX_FOCUS_DIRECTION_RIGHT maps to MX_FOCUS_HINT_FROM_LEFT,
MX_FOCUS_DIRECTION_NEXT maps to MX_FOCUS_HINT_FIRST,
MX_FOCUS_DIRECTION_PREVIOUS maps to MX_FOCUS_HINT_LAST and
anything else maps to MX_FOCUS_HINT_PRIOR.
| 
 | A MxFocusDirection | 
| Returns : | A MxFocusHint | 
Since 1.2