#pragma once #include "Adept.hpp" namespace Adept { class GUITextObject; //########################################################################## //########################### GUIDebugTextObject ###################### //########################################################################## class GUIDebugText: public Plug { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Construction, Destruction // public: GUIDebugText( const char *debug_label, void *data, int type ); ~GUIDebugText(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Functions // public: void Draw(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Public Data // public: enum{ IntType = 0, ScalarType, StringType, Vector3DType, YawPitchRollType }; void *debugData; Stuff::MString debugLabel; int debugType; }; //#################################################################### //########################### GUITextManager #################### //#################################################################### typedef Plug__ClassData GUITextManager__ClassData; class GUITextManager: public Plug { //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Inheritance Support // public: typedef GUITextManager__ClassData ClassData; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Construction, Destruction // public: static void InitializeClass(); static void TerminateClass(); GUITextManager(ClassData *class_data); ~GUITextManager(); void TestInstance(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class Data support // public: static ClassData *DefaultData; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // GUI Initialization // public: void ReadObjectsFromNotation(Stuff::NotationFile *gui_contents); void SaveObjectsToStream(Stuff::MemoryStream *stream); void ReadObjectsFromStream(Stuff::MemoryStream *stream); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // GUI Text Simulation // public: void Execute(); GUITextObject *MakeNewTextObject( const char *display_string, int x_location, int y_location, HGOSFONT3D font_handle = NULL ); void AddTextObject(GUITextObject *text_object); void RemoveTextObject(GUITextObject *text_object); void RemoveTextObject(const MString& text_object_name); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // GUI Debug Text Simulation // public: GUIDebugText *MakeNewDebugTextObject( const char *debug_label, void *value, int type ); void RemoveDebugTextObject(const char *debug_label); void DrawDebugWindow(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Public Data // public: ChainOf guiTextObjects; SortedChainOf guiDebugTextObjects; HGOSFONT3D debugFontHandle; bool debugScreenVisible; static GUITextManager* GetInstance() { return reinterpret_cast( GlobalPointers::GetGlobalPointer(GUITextManagerGlobalPointerIndex)); }; }; }