X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Finclude%2Frenderer_widget.h;h=fd0fa42159d0f0a7475372727bf790a9c0378b38;hb=bfacdd3b71576cf6ceaa83352d3a7d162adb75e1;hp=7187c87f78fb06e9878fcd238bfa4d8113b889bb;hpb=1b3ef37ec6016643ee96ebab4c9966d9bb846b21;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/include/renderer_widget.h b/Usermode/Applications/axwin3_src/WM/include/renderer_widget.h index 7187c87f..fd0fa421 100644 --- a/Usermode/Applications/axwin3_src/WM/include/renderer_widget.h +++ b/Usermode/Applications/axwin3_src/WM/include/renderer_widget.h @@ -9,40 +9,62 @@ #define _RENDERER_WIDGET_H_ #include +#include -enum -{ - MSG_WIDGET_CREATE, - MSG_WIDGET_DELETE, - MSG_WIDGET_SETTEXT -}; +#include + +// === TYPES === +typedef struct sWidgetWin tWidgetWin; +typedef struct sAxWin_Element tElement; -enum eElementTypes +// === STRUCTURES === +struct sAxWin_Element { - ELETYPE_NONE, + enum eElementTypes Type; - ELETYPE_WINDOW, //!< Window root element + tWindow *Window; + uint32_t ID; //!< Application provided ID number + tElement *ListNext; //!< Next element in bucket - ELETYPE_BOX, //!< Content box (invisible in itself) - ELETYPE_TABBAR, //!< Tab Bar - ELETYPE_TOOLBAR, //!< Tool Bar + // Element Tree + tElement *Parent; + tElement *FirstChild; + tElement *LastChild; + tElement *NextSibling; - ELETYPE_BUTTON, //!< Push Button + // User modifiable attributes + short PaddingL, PaddingR; + short PaddingT, PaddingB; + short GapSize; - ELETYPE_TEXT, //!< Text - ELETYPE_IMAGE, //!< Image + uint32_t Flags; - ELETYPE_SPACER, //!< Visual Spacer (horizontal / vertical rule) + short FixedWith; //!< Fixed lengthways Size attribute (height) + short FixedCross; //!< Fixed Cross Size attribute (width) - MAX_ELETYPES = 0x100 -}; + tColour BackgroundColour; -typedef struct + char *Text; + + // -- Attributes maitained by the element code + // Not touched by the user + short MinW; //!< Minimum long size + short MinH; //!< Minimum cross size + void *Data; //!< Per-type data + + // -- Render Cache + short CachedX, CachedY; + short CachedW, CachedH; +}; +struct sWidgetWin { - uint32_t Parent; - uint32_t NewID; - char DebugName[]; -} tWidgetMsg_Create; + tElement RootElement; + + tElement *FocusedElement; + + int TableSize; //!< Number of entries, anything over will wrap + tElement *ElementTable[]; //!< Hash table essentially +}; #endif