- enum Max { Max_None,
- Max_Horz,
- Max_Vert,
- Max_Full };
-
- enum WindowType { Type_Desktop,
- Type_Dock,
- Type_Toolbar,
- Type_Menu,
- Type_Utility,
- Type_Splash,
- Type_Dialog,
- Type_Normal };
-
- enum MwmFlags { Functions = 1 << 0,
- Decorations = 1 << 1 };
-
- enum MwmFunctions { MwmFunc_All = 1 << 0,
- MwmFunc_Resize = 1 << 1,
- MwmFunc_Move = 1 << 2,
- MwmFunc_Iconify = 1 << 3,
- MwmFunc_Maximize = 1 << 4,
- MwmFunc_Close = 1 << 5 };
-
- enum MemDecorations { MemDecor_All = 1 << 0,
- MemDecor_Border = 1 << 1,
- MemDecor_Handle = 1 << 2,
- MemDecor_Title = 1 << 3,
- //MemDecor_Menu = 1 << 4,
- MemDecor_Iconify = 1 << 5,
- MemDecor_Maximize = 1 << 6 };
-
- // this structure only contains 3 elements... the Motif 2.0 structure
- // contains 5... we only need the first 3... so that is all we will define
- typedef struct MwmHints {
- static const int elements = 3;
- unsigned long flags;
- unsigned long functions;
- unsigned long decorations;
+
+ //! The frame window which decorates around the client window
+ /*!
+ NOTE: This should NEVER be used inside the client class's constructor!
+ */
+ OBFrame *frame;
+
+ //! Corners of the client window, used for anchor positions
+ enum Corner { TopLeft,
+ TopRight,
+ BottomLeft,
+ BottomRight };
+
+ //! Possible window types
+ enum WindowType { Type_Desktop, //!< A desktop (bottom-most window)
+ Type_Dock, //!< A dock bar/panel window
+ Type_Toolbar, //!< A toolbar window, pulled off an app
+ Type_Menu, //!< A sticky menu from an app
+ Type_Utility, //!< A small utility window such as a palette
+ Type_Splash, //!< A splash screen window
+ Type_Dialog, //!< A dialog window
+ Type_Normal //!< A normal application window
+ };
+
+ //! Possible flags for MWM Hints (defined by Motif 2.0)
+ enum MwmFlags { MwmFlag_Functions = 1 << 0, //!< The MMW Hints define funcs
+ MwmFlag_Decorations = 1 << 1 //!< The MWM Hints define decor
+ };
+
+ //! Possible functions for MWM Hints (defined by Motif 2.0)
+ enum MwmFunctions { MwmFunc_All = 1 << 0, //!< All functions
+ MwmFunc_Resize = 1 << 1, //!< Allow resizing
+ MwmFunc_Move = 1 << 2, //!< Allow moving
+ MwmFunc_Iconify = 1 << 3, //!< Allow to be iconfied
+ MwmFunc_Maximize = 1 << 4 //!< Allow to be maximized
+ //MwmFunc_Close = 1 << 5 //!< Allow to be closed
+ };
+
+ //! Possible decorations for MWM Hints (defined by Motif 2.0)
+ enum MemDecorations { MwmDecor_All = 1 << 0, //!< All decorations
+ MwmDecor_Border = 1 << 1, //!< Show a border
+ MwmDecor_Handle = 1 << 2, //!< Show a handle (bottom)
+ MwmDecor_Title = 1 << 3, //!< Show a titlebar
+ //MwmDecor_Menu = 1 << 4, //!< Show a menu
+ MwmDecor_Iconify = 1 << 5, //!< Show an iconify button
+ MwmDecor_Maximize = 1 << 6 //!< Show a maximize button
+ };
+
+ //! The things the user can do to the client window
+ enum Function { Func_Resize = 1 << 0, //!< Allow resizing
+ Func_Move = 1 << 1, //!< Allow moving
+ Func_Iconify = 1 << 2, //!< Allow to be iconified
+ Func_Maximize = 1 << 3, //!< Allow to be maximized
+ Func_Close = 1 << 4 //!< Allow to be closed
+ };
+ //! Holds a bitmask of OBClient::Function values
+ typedef unsigned char FunctionFlags;
+
+ //! The decorations the client window wants to be displayed on it
+ enum Decoration { Decor_Titlebar = 1 << 0, //!< Display a titlebar
+ Decor_Handle = 1 << 1, //!< Display a handle (bottom)
+ Decor_Border = 1 << 2, //!< Display a border
+ Decor_Iconify = 1 << 3, //!< Display an iconify button
+ Decor_Maximize = 1 << 4, //!< Display a maximize button
+ Decor_Sticky = 1 << 5, //!< Display a sticky button
+ Decor_Close = 1 << 6 //!< Display a close button