#include <umode.hpp>
Inheritance diagram for ubit::UMode:
Public Types | |
UCONST = 1<<0 | |
this object is constant | |
CAN_DELETE = 1<<1 | |
this object was created by 'new' and can be destroyed by 'delete' | |
UPDATING = 1<<2 | |
this object is being updated (ie. repainted or re-layed out) | |
DESTRUCTING = 1<<3 | |
this object is being destructed (by its destructors) | |
DESTRUCTED = 1<<4 | |
this object has been fully destructed (by all its destructors) but the memory has not been freed yet (operator delete being redefined) | |
DONT_PROPAGATE = UCONST | CAN_DELETE | UPDATING | DESTRUCTED | DESTRUCTING | |
these modes should not be propagated to parents | |
NO_AUTO_UPDATE = 1<<5 | |
update() is NOT invoked when set(), add() or remove() are called | |
IN_SELECTION = 1<<6 | |
this object is part of a text selection | |
HAS_ORIENT = 1<<7 | |
this object has a vertical orientation (horizontal otherwise) | |
IS_VERTICAL = 1<<8 | |
CANT_RESIZE_WIDTH = 1<<9 | |
CANT_RESIZE_HEIGHT = 1<<10 | |
IGNORE_EVENTS = 1<<11 | |
this object ignores events (its parent will get them) | |
DESTRUCT_CB = 1<<12 | |
callbacks this object is sensitive to | |
CONTAINER_CB = 1<<13 | |
CHANGE_CB = 1<<14 | |
CHILD_CHANGE_CB = 1<<15 | |
VIEW_PAINT_CB = 1<<16 | |
VIEW_CHANGE_CB = 1<<17 | |
SHOW_HIDE_CB = 1<<18 | |
MOUSE_CB = 1<<19 | |
MOUSE_CROSS_CB = 1<<20 | |
MOUSE_DRAG_CB = 1<<21 | |
MOUSE_MOVE_CB = 1<<22 | |
KEY_CB = 1<<23 | |
DND_CB = 1<<24 | |
FILTER_EVENT_CB = 1<<26 | |
WINDOW_EVENT_CB = 1<<27 | |
MSG_PROP_EVENT_CB = 1<<28 | |
USER_EVENT_CB = 1<<29 | |
MISC_EVENT_CB = 1<<30 | |
CALLBACKS | |
GROUP = 1<<0 | |
group container (without views) | |
BOX = 1<<1 | |
box container (manages views) | |
SOFTWIN = 1<<2 | |
soft window (simulated window, HAS_POS is true) | |
HARDWIN = 1<<3 | |
hard window (native window) | |
CHILDWIN = 1<<4 | |
hard window that is embedded in a window | |
MENUWIN = 1<<5 | |
menu window | |
HAS_POS = 1<<6 | |
this box/win has a UPos | |
PSEUDO_PARENT = 1<<7 | |
not taken into account when deleting children | |
BORDER_LIST = 1<<8 | |
list of border frame elements | |
SOFTWIN_LIST = 1<<9 | |
list of softwins controlled by a hardwin | |
CAN_SHOW = 1<<10 | |
refer to isShowable() and isShown() methods for details. | |
MODAL = 1<<12 | |
this object is modal when shown | |
SELECTED = 1<<13 | |
this object is in the selected mode | |
CAN_SELECT = 1<<14 | |
can be selected (in the same way as a checkbox) | |
CAN_SELECT_TEXT = 1<<15 | |
can select included text | |
CAN_EDIT_TEXT = 1<<16 | |
can edit included text (ie. the group contains a UEdit brick) | |
CAN_BROWSE_CHILDREN = 1<<17 | |
can browse children (for lists and menus) | |
CAN_DRAG = 1<<18 | |
can be dragged (with button 1 or button2) or dropped | |
CAN_DROP = 1<<19 | |
CAN_ARM = 1<<20 | |
can be armed (meaning it will be repaint on UOn::arm and that corresponding object's callbacks will be called) | |
AUTO_REPEAT = 1<<21 | |
auto-repeats UOn::arm while armed | |
ENTER_HIGHLIGHT = 1<<23 | |
highlights on UOn::enter and UOn::leave conditions | |
HAS_TIP = 1<<24 | |
this object has a tool tip | |
HAS_CURSOR = 1<<25 | |
this object has a cursor. | |
HAS_LAYOUT = 1<<26 | |
this object has a layout manager. | |
HAS_CLOSE_MENU_MODE = 1<<27 | |
if HAS_CLOSE_MENU_MODE is true, CLOSE_MENU_MODE defines this behavior (which is then dynamically inherited) | |
CLOSE_MENU_MODE = 1<<28 | |
WIN_MAPPED = 1<<29 | |
this win is mapped on the screen | |
WIN_AUTO_OPEN_MODE = 1<<30 | |
this win is automatically opened if its parent is ARMable | |
ANY = -1 | |
IDLE = 0 | |
DISABLED | |
ENTERED | |
ARMED | |
ACTIONED | |
DRAGGED | |
DROP_ENTERED | |
ACTION_COUNT | |
enum | BMODES { UCONST = 1<<0, CAN_DELETE = 1<<1, UPDATING = 1<<2, DESTRUCTING = 1<<3, DESTRUCTED = 1<<4, DONT_PROPAGATE = UCONST | CAN_DELETE | UPDATING | DESTRUCTED | DESTRUCTING, NO_AUTO_UPDATE = 1<<5, IN_SELECTION = 1<<6, HAS_ORIENT = 1<<7, IS_VERTICAL = 1<<8, CANT_RESIZE_WIDTH = 1<<9, CANT_RESIZE_HEIGHT = 1<<10, IGNORE_EVENTS = 1<<11, DESTRUCT_CB = 1<<12, CONTAINER_CB = 1<<13, CHANGE_CB = 1<<14, CHILD_CHANGE_CB = 1<<15, VIEW_PAINT_CB = 1<<16, VIEW_CHANGE_CB = 1<<17, SHOW_HIDE_CB = 1<<18, MOUSE_CB = 1<<19, MOUSE_CROSS_CB = 1<<20, MOUSE_DRAG_CB = 1<<21, MOUSE_MOVE_CB = 1<<22, KEY_CB = 1<<23, DND_CB = 1<<24, FILTER_EVENT_CB = 1<<26, WINDOW_EVENT_CB = 1<<27, MSG_PROP_EVENT_CB = 1<<28, USER_EVENT_CB = 1<<29, MISC_EVENT_CB = 1<<30, CALLBACKS } |
enum | CMODES { GROUP = 1<<0, BOX = 1<<1, SOFTWIN = 1<<2, HARDWIN = 1<<3, CHILDWIN = 1<<4, MENUWIN = 1<<5, HAS_POS = 1<<6, PSEUDO_PARENT = 1<<7, BORDER_LIST = 1<<8, SOFTWIN_LIST = 1<<9, CAN_SHOW = 1<<10, MODAL = 1<<12, SELECTED = 1<<13, CAN_SELECT = 1<<14, CAN_SELECT_TEXT = 1<<15, CAN_EDIT_TEXT = 1<<16, CAN_BROWSE_CHILDREN = 1<<17, CAN_DRAG = 1<<18, CAN_DROP = 1<<19, CAN_ARM = 1<<20, AUTO_REPEAT = 1<<21, ENTER_HIGHLIGHT = 1<<23, HAS_TIP = 1<<24, HAS_CURSOR = 1<<25, HAS_LAYOUT = 1<<26, HAS_CLOSE_MENU_MODE = 1<<27, CLOSE_MENU_MODE = 1<<28, WIN_MAPPED = 1<<29, WIN_AUTO_OPEN_MODE = 1<<30 } |
enum | ISTATE { ANY = -1, IDLE = 0, DISABLED, ENTERED, ARMED, ACTIONED, DRAGGED, DROP_ENTERED, ACTION_COUNT } |
Public Member Functions | |
UMode (UMask bmodes, UMask cmodes, bool on_off) | |
UMode (UMask bmodes=0) | |
virtual void | setParentModes (UControl *parent) const |
virtual void | addingTo (UChild *, UGroup *parent) |
called when this object is added to a parent. | |
virtual void | removingFrom (UChild *, UGroup *parent) |
NOTE that this function requires a destructor. | |
Static Public Attributes | |
static UMode | selected |
static UMode | canSelect |
parents can be selected (see UMode::CAN_SELECT) | |
static UMode | enterHighlight |
parents are highlighted when entered | |
static UMode | autoRepeat |
auto-repeats UOn::arm while armed | |
static UMode | canArm |
parents can be armed (see also: UControl::isArmable(), UMode::CAN_ARM) | |
static UMode | canDrag |
parents can start a drag and drop action | |
static UMode | canDrop |
parents can receive a drag and drop action | |
static UMode | ignoreEvents |
parents will ignore events | |
Protected Attributes | |
UMask | cmodes |
UMask | bmask |
UMask | cmask |
Friends | |
class | UControl |
this class is implementation dependant. only its static fields should be used by clients.
enum ubit::UMode::BMODES |
UCONST | this object is constant |
CAN_DELETE | this object was created by 'new' and can be destroyed by 'delete' |
UPDATING | this object is being updated (ie. repainted or re-layed out) |
DESTRUCTING | this object is being destructed (by its destructors) |
DESTRUCTED | this object has been fully destructed (by all its destructors) but the memory has not been freed yet (operator delete being redefined) |
DONT_PROPAGATE | these modes should not be propagated to parents |
NO_AUTO_UPDATE | update() is NOT invoked when set(), add() or remove() are called |
IN_SELECTION | this object is part of a text selection |
HAS_ORIENT | this object has a vertical orientation (horizontal otherwise) |
IGNORE_EVENTS | this object ignores events (its parent will get them) |
DESTRUCT_CB | callbacks this object is sensitive to |
enum ubit::UMode::CMODES |
GROUP | group container (without views) |
BOX | box container (manages views) |
SOFTWIN | soft window (simulated window, HAS_POS is true) |
HARDWIN | hard window (native window) |
CHILDWIN | hard window that is embedded in a window |
MENUWIN | menu window |
HAS_POS | this box/win has a UPos |
PSEUDO_PARENT | not taken into account when deleting children |
BORDER_LIST | list of border frame elements |
SOFTWIN_LIST | list of softwins controlled by a hardwin |
CAN_SHOW | refer to isShowable() and isShown() methods for details. |
MODAL | this object is modal when shown |
SELECTED | this object is in the selected mode |
CAN_SELECT | can be selected (in the same way as a checkbox) |
CAN_SELECT_TEXT | can select included text |
CAN_EDIT_TEXT | can edit included text (ie. the group contains a UEdit brick) |
CAN_BROWSE_CHILDREN | can browse children (for lists and menus) |
CAN_DRAG | can be dragged (with button 1 or button2) or dropped |
CAN_ARM | can be armed (meaning it will be repaint on UOn::arm and that corresponding object's callbacks will be called) |
AUTO_REPEAT | auto-repeats UOn::arm while armed |
ENTER_HIGHLIGHT | highlights on UOn::enter and UOn::leave conditions |
HAS_TIP | this object has a tool tip |
HAS_CURSOR | this object has a cursor. |
HAS_LAYOUT | this object has a layout manager. |
HAS_CLOSE_MENU_MODE | if HAS_CLOSE_MENU_MODE is true, CLOSE_MENU_MODE defines this behavior (which is then dynamically inherited) |
WIN_MAPPED | this win is mapped on the screen |
WIN_AUTO_OPEN_MODE | this win is automatically opened if its parent is ARMable |