Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ORE_GUI_BASES_H
- #define ORE_GUI_BASES_H
- #include "treeimpl.h"
- namespace ore
- {
- namespace gui
- {
- ////////////////////////////////////////////
- // Basic "Object" Bases (Rect objects, elliptical objects, etc.)
- ////////////////////////////////////////////
- class CInternalBase_PositionalObject
- {
- public:
- float myX, myY;
- CInternalBase_PositionalObject () {}
- CInternalBase_PositionalObject (float xIn, float yIn)
- : myX (xIn), myY (yIn)
- {
- }
- virtual ~CInternalBase_PositionalObject () {}
- void Set_Position (float xIn, float yIn)
- {
- myX = xIn;
- myY = yIn;
- }
- };
- class CInternalBase_PositionalPolygon
- {
- public:
- float myOriginX, myOriginY;
- CInternalBase_PositionalPolygon () {}
- CInternalBase_PositionalPolygon (float originXIn, float originYIn)
- {
- }
- virtual ~CInternalBase_PositionalPolygon () {}
- void Set_Origin (float originXIn, float originYIn)
- {
- myOriginX = originXIn;
- myOriginY = originYIn;
- }
- };
- class CInternalBase_Rect
- : public CInternalBase_PositionalObject, // x, y
- public CInternalBase_PositionalPolygon // origin
- {
- public:
- float myWidth, myHeight;
- CInternalBase_Rect () {}
- CInternalBase_Rect (float xIn, float yIn, float widthIn, float heightIn, float originXIn = 0.0f, float originYIn = 0.0f)
- : CInternalBase_PositionalObject (xIn, yIn),
- CInternalBase_PositionalPolygon (originXIn, originYIn),
- myWidth (widthIn), myHeight (heightIn)
- {
- }
- virtual ~CInternalBase_Rect () {}
- void Set_Size (float widthIn, float heightIn)
- {
- myWidth = widthIn;
- myHeight = heightIn;
- }
- };
- ////////////////////////////////////////////
- // GUI Element Templates
- ////////////////////////////////////////////
- class CBase_InactiveElement;
- class CBase_InteractiveElement;
- class CBase_ViewingArea;
- /*
- Use: Output Boxes, Animated Graphics, etc.
- Maintains:
- Rendering and Processing
- */
- class CBase_InactiveElement
- : public ie::CBasicSequentialTreeNode
- {
- public:
- void Process_AttachProcessing (CBase_ViewingArea * ptrViewingAreaIn);
- void Process_AttachRendering (CBase_ViewingArea * ptrViewingAreaIn);
- };
- /*
- Use: Buttons, Text Boxes, etc.
- Maintains:
- Event Handling
- */
- class CBase_InteractiveElement
- : public CBase_InactiveElement // For rendering/processing
- {
- public:
- virtual void Event_DefaultHandler ();
- };
- /*
- Use: Tabs, Windows, Toolbars, Menus, etc.
- Maintains:
- Children Management
- */
- class CBase_ViewingArea
- : public CBase_InteractiveElement, public ie::CBasicSequentialTreeSplit
- {
- public:
- virtual void Request_AppropriateDimensioning (float * ptrXOut, float * ptrYOut, float * ptrWidthOut, float * ptrHeightOut);
- virtual void Children_Add ();
- };
- }
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment