ui_node_panel.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef CLIENT_UI_UI_NODE_PANEL_H
00026 #define CLIENT_UI_UI_NODE_PANEL_H
00027
00028 #include "ui_node_abstractscrollable.h"
00029
00030 struct uiNode_s;
00031 struct uiBehaviour_s;
00032
00033 typedef enum {
00034 LAYOUT_NONE,
00035 LAYOUT_TOP_DOWN_FLOW,
00036 LAYOUT_BORDER,
00037 LAYOUT_PACK,
00038 LAYOUT_STAR,
00039 LAYOUT_CLIENT,
00040 LAYOUT_COLUMN,
00041
00042 LAYOUT_MAX,
00043 LAYOUT_ENSURE_32BIT = 0x7FFFFFFF
00044 } panelLayout_t;
00045
00046 typedef enum {
00047 LAYOUTALIGN_NONE = 0,
00048
00049
00050 LAYOUTALIGN_H_MASK = 0x03,
00051 LAYOUTALIGN_H_LEFT = 0x01,
00052 LAYOUTALIGN_H_MIDDLE = 0x02,
00053 LAYOUTALIGN_H_RIGHT = 0x03,
00054 LAYOUTALIGN_V_MASK = 0x0C,
00055 LAYOUTALIGN_V_TOP = 0x04,
00056 LAYOUTALIGN_V_MIDDLE = 0x08,
00057 LAYOUTALIGN_V_BOTTOM = 0x0C,
00058
00059
00060 LAYOUTALIGN_TOPLEFT = LAYOUTALIGN_V_TOP | LAYOUTALIGN_H_LEFT,
00061 LAYOUTALIGN_TOP = LAYOUTALIGN_V_TOP | LAYOUTALIGN_H_MIDDLE,
00062 LAYOUTALIGN_TOPRIGHT = LAYOUTALIGN_V_TOP | LAYOUTALIGN_H_RIGHT,
00063 LAYOUTALIGN_LEFT = LAYOUTALIGN_V_MIDDLE | LAYOUTALIGN_H_LEFT,
00064 LAYOUTALIGN_MIDDLE = LAYOUTALIGN_V_MIDDLE | LAYOUTALIGN_H_MIDDLE,
00065 LAYOUTALIGN_RIGHT = LAYOUTALIGN_V_MIDDLE | LAYOUTALIGN_H_RIGHT,
00066 LAYOUTALIGN_BOTTOMLEFT = LAYOUTALIGN_V_BOTTOM | LAYOUTALIGN_H_LEFT,
00067 LAYOUTALIGN_BOTTOM = LAYOUTALIGN_V_BOTTOM | LAYOUTALIGN_H_MIDDLE,
00068 LAYOUTALIGN_BOTTOMRIGHT = LAYOUTALIGN_V_BOTTOM | LAYOUTALIGN_H_RIGHT,
00069
00070
00071 LAYOUTALIGN_SPECIAL = 0x10,
00072
00073
00074 LAYOUTALIGN_FILL,
00075
00076 LAYOUTALIGN_MAX,
00077 LAYOUTALIGN_ENSURE_32BIT = 0x7FFFFFFF
00078 } layoutAlign_t;
00079
00084 #define UI_GET_VERTICAL_ALIGN(align) ((align >= LAYOUTALIGN_SPECIAL)?LAYOUTALIGN_NONE:(LAYOUTALIGN_V_MASK & align))
00085
00089 #define UI_GET_HORIZONTAL_ALIGN(align) ((align >= LAYOUTALIGN_SPECIAL)?LAYOUTALIGN_NONE:(LAYOUTALIGN_H_MASK & align))
00090
00094 typedef struct {
00095 abstractScrollableExtraData_t super;
00096 panelLayout_t layout;
00097 int layoutMargin;
00098 int layoutColumns;
00099 } panelExtraData_t;
00100
00101 void UI_RegisterPanelNode(struct uiBehaviour_s *behaviour);
00102
00103 void UI_StarLayout(struct uiNode_s *node);
00104
00105 #endif