In file apps/mazed/me_app.h:

class MazeEditor : public csApp

MazeEditor is a subclass of csApp and implements all top-level functionality of Maze Editor such as manipulating windows, loading/saving models etc

Inheritance:


Public Fields

mzModificationAxis Axis
Modification axis parameters
int CurrentModel
Current model index in Models array
static float DraftGridSpacing
Grid spacing (same along all axis)
static float DraftPickDist
The maximal screen distance (squared) at which points are picked together
static bool fCrossVertices
Draw vertices as crosses
static bool fDraftAxis
Draw coordinate axes on draft view?
static bool fDraftGrid
Draw grid on draft vide?
static bool fDraftModificationAxis
Draw modification axis on draft views?
static bool fDraftShowInactiveRooms
Draw all rooms or only current room/model?
static bool fSnapToGrid
Snap vertices to grid?
mz3DModel* Model
Current model (just a shortcut to Models [ModelIndex])
csObjVector Models
All models in current scene
csWorld* new_world
twin world for temporary storage of sectors
static int NgonSides
Number of sides for N-gon
static int PrismSides
Number of sides in prism
static int PyramidSides
Number of sides in pyramid
static int SphereDetail
Sphere detail level
static int TorusCrossSectionDetail
Torus cross-section detail level
static int TorusRadialDetail
Torus radial detail level

Public Methods

void CreateModel(csModelType Type)
Create a new model of given type and make it current
void DeleteModel(int iIndex)
Delete given model
void EnsureFullyVisible(csComponent *comp)
Ensure that a component fits on desktop; move it if required
inline UInt GetCreate2Dmode()
Query "Create 2D" mode selected item
inline UInt GetCreate3Dmode()
Query "Create 3D" mode selected item
inline UInt GetCreatePolyMode()
Query "Create Poly" mode selected item
inline UInt GetEditMode()
Query active editing mode (one of cscmdMzCreateVertex etc)
int GetMode()
Query current editing mode
inline UInt GetModifyMode()
Query "Modify" mode selected item
inline UInt GetSelectMode()
Query "Select" mode selected item
inline UInt GetVertexMode()
Query "Vertex" mode selected item
inline UInt GetWindowLayout()
Query active window layout number (0, 1, ...)
virtual bool HandleEvent(csEvent &Event)
Handle a event
virtual bool InitialSetup()
Initial setup of Maze Editor
MazeEditor(int argc, char *argv[])
Initialize maze editor
void ModelInfo()
Refresh info about current model
void SelectModel(int iNum)
Select given model
void SetInfo(int id, int val)
Set specific info field to given numeric value
void SetInfo(int id, char *val)
Set specific info field to given string value
void SetInfo(int id, float val)
Set specific info field to given numeric value
void SetMode(int iMode, bool Quiet)
Set current editing mode; if mode needs args, don't ask if Quiet
void SetOpDescription(char *iText, ...)
Set current operation description on info pane
~MazeEditor()
Free all resources

Public

Static global option variables

Protected Methods

void BarSetupDialog(csButton *Source)
Show and run setup dialog for given action code
virtual void LoadConfig()
Override LoadConfig to load user-defined textures

Inherited from csApp:

Public Fields

csStrVector* customtexturename
csStrVector* dialogdefs
char* dialogtexturename
csComponent* FocusOwner
bool insert
csComponent* KeyboardOwner
csComponent* MouseOwner
char* mousetexturename
int Pal[cs_Color_Last]
bool RedrawFlag
csStrVector* titlebardefs
char* titletexturename
bool WindowListChanged

Public Methods

csComponent* CaptureFocus(csComponent *who)
csComponent* CaptureKeyboard(csComponent *who)
csComponent* CaptureMouse(csComponent *who)
virtual void Delete(csComponent *comp)
void Dismiss(int iCode = cscmdCancel)
virtual void Draw()
int Execute(csComponent *comp)
Archive* GetArchive()
bool GetKeyState(int iKey)
csMouse* GetMouse()
csMouseCursorID GetMouseCursor()
int GetPage()
csTextureHandle* GetTexture(char *Name)
csTextureList* GetTextures()
csWorld* GetWorld()
void Idle()
virtual void Insert(csComponent *comp)
virtual void Loop()
virtual void NextFrame()
virtual bool PostHandleEvent(csEvent &Event)
void pplBox(int x, int y, int w, int h, int color)
void pplClear(int color)
void pplFreeArea(ImageArea *Area)
void pplLine(float x1, float y1, float x2, float y2, int color)
void pplPixel(int x, int y, int color)
void pplRestoreArea(ImageArea *Area, bool Free = false)
void pplRestoreClipRect()
void pplSaveArea(ImageArea *&Area, int x, int y, int w, int h)
void pplSetClipRect(csRect &clip)
void pplSetClipRect(int xmin, int ymin, int xmax, int ymax)
void pplSprite2D(csSprite2D *s2d, int x, int y, int w, int h)
void pplText(int x, int y, int fg, int bg, int Font, char *s)
virtual bool PreHandleEvent(csEvent &Event)
void Process()
void PutEvent(csEvent *Event)
void SetMouseCursor(csMouseCursorID ID)
void SetWindowListSize(int iWidth, int iHeight)
virtual void SetWorld(csWorld *AppWorld)
void ShutDown()
int TextHeight(int Font)
int TextWidth(char *text, int Font)
void WindowList()

Protected Fields

csAppBackgroundStyle BackgroundStyle
int DismissCode
csEventQueue* EventQueue
csGraphicsPipeline* GfxPpl
int LoopLevel
csMouse* Mouse
csMouseCursorID MouseCursorID
int WindowListWidth
csWorld* world

Private Methods

void LoadTextures()
void SetupPalette()
void Update()

Inherited from csComponent:

Public Fields

csApp* app
csRect bound
csVector clipchildren
csComponent* focused
unsigned int id
csComponent* next
csComponent* parent
csComponent* top

Public Methods

void Box(int xmin, int ymin, int xmax, int ymax, int colindx)
void Center(bool iHoriz = true, bool iVert = true)
virtual void Close()
void DeleteAll()
void DeleteClipChild(csComponent *clipchild)
void Drag(int x, int y, int DragMode)
void FindMaxFreeRect(csRect &area)
virtual void FixPosition(int &newX, int &newY)
virtual void FixSize(int &newW, int &newH)
csComponent* ForEach(bool (*func) (csComponent *child, void *param), void *param = NULL, bool Zorder = false)
csComponent* GetChild(int find_id)
csComponent* GetClipParent()
int GetColor(int Index)
csComponent* GetDefault()
int GetDragStyle()
csComponent* GetFocused()
int GetFont()
int GetState(int mask)
virtual char* GetText()
virtual void GetText(char *oText, int iTextSize)
csComponent* GetTop()
void GlobalToLocal(int &x, int &y)
bool HandleDragEvent(csEvent &Event, int BorderW, int BorderH)
virtual void Hide()
void InsertClipChild(csComponent *clipchild)
void Invalidate(bool IncludeChildren = false)
void Invalidate(csRect &area, bool IncludeChildren = false)
void Invalidate(int xmin, int ymin, int xmax, int ymax, bool IncludeChildren = false)
void Line(float x1, float y1, float x2, float y2, int colindx)
void LocalToGlobal(int &x, int &y)
virtual bool Maximize()
virtual csComponent* NextChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* NextControl(csComponent *start = NULL)
virtual csComponent* NextGroup(csComponent *start = NULL)
void ObliqueRect3D(int xmin, int ymin, int xmax, int ymax, int cornersize, int darkindx, int lightindx)
void Pixel(int x, int y, int colindx)
virtual csComponent* PrevChild(csComponent *start = NULL, bool disabled = false)
virtual csComponent* PrevControl(csComponent *start = NULL)
virtual csComponent* PrevGroup(csComponent *start = NULL)
void Rect3D(int xmin, int ymin, int xmax, int ymax, int darkindx, int lightindx)
void Redraw()
virtual bool Restore()
bool Select()
void* SendCommand(int CommandCode, void *Info = NULL)
void SetApp(csApp *newapp)
void SetClipRect(int xmin, int ymin, int xmax, int ymax)
void SetClipRect()
void SetColor(int Index, int Color)
bool SetDragRect(int xmin, int ymin, int xmax, int ymax)
void SetDragStyle(int iDragStyle)
bool SetFocused(csComponent *comp)
void SetFont(int iFont, bool IncludeChildren = false)
void SetMouse(csMouseCursorID Cursor)
void SetPalette(int *iPalette, int iPaletteSize)
void SetPalette(int iPaletteID)
void SetPos(int x, int y)
virtual bool SetRect(int xmin, int ymin, int xmax, int ymax)
bool SetRect(csRect &rect)
void SetSize(int w, int h)
void SetSizingCursor(int dragtype)
virtual void SetState(int mask, bool enable)
virtual void SetSuggestedSize(int dw, int dh)
virtual void SetText(char *iText)
bool SetZorder(csComponent *comp, csComponent *below)
virtual void Show(bool focused = false)
void Sprite2D(csSprite2D *s2d, int x, int y)
void Sprite2D(csSprite2D *s2d, int x, int y, int w, int h)
virtual void SuggestSize(int &w, int &h)
void Text(int x, int y, int fgindx, int bgindx, char *s)

Protected Fields

csRect clip
csComponent* clipparent
csRect dirty
static csRect dragBound
int DragStyle
static int dragX
int Font
bool Maximized
csRect OrgBound
bool originalpalette
int* palette
int state
char* text

Protected Methods

void Clip(csObjVector &rect, csComponent *last)
void ClipAlienChildren(csObjVector &rect, csComponent *child)
void DrawUnderline(int iX, int iY, char *iText, int iUnderlinePos, int iColor)
static void PrepareLabel(char *iLabel, char * &oLabel, int &oUnderlinePos)
static int WordLeft(char *iText, int StartPos)
static int WordRight(char *iText, int StartPos)

Inherited from csBase:


Documentation

MazeEditor is a subclass of csApp and implements all top-level functionality of Maze Editor such as manipulating windows, loading/saving models etc
Static global option variables

static bool fDraftAxis
Draw coordinate axes on draft view?

static bool fDraftGrid
Draw grid on draft vide?

static bool fSnapToGrid
Snap vertices to grid?

static float DraftGridSpacing
Grid spacing (same along all axis)

static bool fCrossVertices
Draw vertices as crosses

static float DraftPickDist
The maximal screen distance (squared) at which points are picked together

mzModificationAxis Axis
Modification axis parameters

static bool fDraftModificationAxis
Draw modification axis on draft views?

static bool fDraftShowInactiveRooms
Draw all rooms or only current room/model?

static int NgonSides
Number of sides for N-gon

static int PrismSides
Number of sides in prism

static int PyramidSides
Number of sides in pyramid

static int TorusRadialDetail
Torus radial detail level

static int TorusCrossSectionDetail
Torus cross-section detail level

static int SphereDetail
Sphere detail level

csObjVector Models
All models in current scene

int CurrentModel
Current model index in Models array

mz3DModel* Model
Current model (just a shortcut to Models [ModelIndex])

csWorld* new_world
twin world for temporary storage of sectors

MazeEditor(int argc, char *argv[])
Initialize maze editor

~MazeEditor()
Free all resources

virtual bool InitialSetup()
Initial setup of Maze Editor

virtual bool HandleEvent(csEvent &Event)
Handle a event

void SetMode(int iMode, bool Quiet)
Set current editing mode; if mode needs args, don't ask if Quiet

int GetMode()
Query current editing mode

void SetOpDescription(char *iText, ...)
Set current operation description on info pane

void SetInfo(int id, char *val)
Set specific info field to given string value

void SetInfo(int id, float val)
Set specific info field to given numeric value

void SetInfo(int id, int val)
Set specific info field to given numeric value

void ModelInfo()
Refresh info about current model

inline UInt GetEditMode()
Query active editing mode (one of cscmdMzCreateVertex etc)

inline UInt GetWindowLayout()
Query active window layout number (0, 1, ...)

inline UInt GetVertexMode()
Query "Vertex" mode selected item

inline UInt GetCreate2Dmode()
Query "Create 2D" mode selected item

inline UInt GetCreate3Dmode()
Query "Create 3D" mode selected item

inline UInt GetCreatePolyMode()
Query "Create Poly" mode selected item

inline UInt GetSelectMode()
Query "Select" mode selected item

inline UInt GetModifyMode()
Query "Modify" mode selected item

void CreateModel(csModelType Type)
Create a new model of given type and make it current

void SelectModel(int iNum)
Select given model

void DeleteModel(int iIndex)
Delete given model

void EnsureFullyVisible(csComponent *comp)
Ensure that a component fits on desktop; move it if required

virtual void LoadConfig()
Override LoadConfig to load user-defined textures

void BarSetupDialog(csButton *Source)
Show and run setup dialog for given action code


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de