Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
GUIEdit Class Reference

#include <GUIEdit.h>

Public Member Functions

 GUIEdit (void)
 
 ~GUIEdit (void)
 
void init (void)
 initialize data
 
void shutdown (void)
 shutdown all our data
 
void update (void)
 process the universe
 
Bool readConfigFile (char *filename)
 read the configuration file
 
Bool writeConfigFile (char *filename)
 write the configuration file
 
void readFontFile (char *filename)
 read file with available font definitions
 
void writeFontFile (char *filename)
 write all loaded fonts to a file
 
char * getSaveFilename (void)
 
char * getSavePathAndFilename (void)
 
void setSaveFile (char *fullPathAndFilename)
 set filename to use for saving
 
HWND getWindowHandle (void)
 get window handle
 
HINSTANCE getInstance (void)
 get application instance
 
HWND getStatusBarWindowHandle (void)
 get status bar HWND
 
void createStatusBar (void)
 create status bar
 
void statusMessage (StatusPart part, char *message)
 set status bar textl
 
void createToolbar (void)
 create the toolbar
 
void setCursor (CursorType type)
 set cursor
 
void setPropertyTarget (GameWindow *window)
 set window for property editing
 
GameWindowgetPropertyTarget (void)
 get window editing properties
 
void loadGUIEditFontLibrary (FontLibrary *library)
 fonts available in the editor
 
Bool isNameDuplicate (GameWindow *root, GameWindow *ignore, AsciiString name)
 
EditMode getMode (void)
 return the current mode
 
void setMode (EditMode mode)
 set the new mode
 
void setUnsaved (Bool unsaved)
 set unsaved flag to FALSE or TRUE
 
Bool newLayout (void)
 reset editor for new layout
 
void setGridResolution (Int res)
 
Int getGridResolution (void)
 
void setGridVisible (Bool visible)
 
Bool isGridVisible (void)
 
void setGridSnap (Bool on)
 
Bool isGridSnapOn (void)
 
void setGridColor (RGBColorInt *color)
 
RGBColorIntgetGridColor (void)
 
void gridSnapLocation (ICoord2D *source, ICoord2D *snapped)
 
void setShowHiddenOutlines (Bool show)
 
Bool getShowHiddenOutlines (void)
 
void setShowSeeThruOutlines (Bool show)
 
Bool getShowSeeThruOutlines (void)
 
Bool windowIsGadget (GameWindow *window)
 is the window a gadget
 
WindowSelectionEntrygetSelectList (void)
 get the selected list head
 
GameWindowgetFirstSelected (void)
 get first selected window
 
void moveWindowTo (GameWindow *window, Int x, Int y)
 move window
 
Bool isWindowSelected (GameWindow *window)
 is window selected
 
void selectWindow (GameWindow *window)
 add to selection list
 
void unSelectWindow (GameWindow *window)
 remove from selection list
 
void clearSelections (void)
 clear selection list
 
Int selectionCount (void)
 return # of selected windows
 
void deleteSelected (void)
 delete selected windows
 
void bringSelectedToTop (void)
 
void selectWindowsInRegion (IRegion2D *region)
 select the windows that are FULLY in the region specified
 
void dragMoveSelectedWindows (ICoord2D *dragOrigin, ICoord2D *dragDest)
 
void computeSafeLocation (GameWindow *window, Int x, Int y, Int *safeX, Int *safeY)
 given a position to move a window to, keep it onscreen and inside parent
 
void computeSafeSizeLocation (GameWindow *window, Int newX, Int newY, Int newWidth, Int newHeight, Int *safeX, Int *safeY, Int *safeWidth, Int *safeHeight)
 given position and size to move a window to, keep it inside parent and on screen
 
void computeResizeLocation (EditMode resizeMode, GameWindow *window, ICoord2D *resizeOrigin, ICoord2D *resizeDest, ICoord2D *resultLoc, ICoord2D *resultSize)
 compute new size of window using drag-resize logic
 
void notifyNewWindow (GameWindow *window)
 
GameWindowgetWindowAtPos (Int x, Int y)
 get topmost window at pos
 
void deleteAllWindows (void)
 delete all windows in the editor
 
void removeWindowCleanup (GameWindow *window)
 to cleanup before delete
 
void deleteWindow (GameWindow *window)
 delete a game window
 
void clipCreationParamsToParent (GameWindow *parent, Int *x, Int *y, Int *width, Int *height)
 
GameWindownewWindow (UnsignedInt windowStyle, GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewUserWindow (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewPushButton (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewCheckBox (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewRadioButton (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewTabControl (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewHorizontalSlider (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewVerticalSlider (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewProgressBar (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewListbox (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewTextEntry (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewStaticText (GameWindow *parent, Int x, Int y, Int width, Int height)
 
GameWindownewComboBox (GameWindow *parent, Int x, Int y, Int width, Int height)
 
Bool menuNew (void)
 start a new layout process
 
Bool menuOpen (void)
 hit open on menu
 
void stripNameDecorations (GameWindow *root)
 after a load
 
void revertDefaultCallbacks (GameWindow *root)
 after a load
 
Bool menuSave (void)
 hit save on menu
 
Bool menuSaveAs (void)
 hit save as on menu
 
Bool menuExit (void)
 exit application
 
Bool menuCopy (void)
 copy selected windows into copy buffer
 
Bool menuPaste (void)
 paste contents of copy buffer
 
Bool menuCut (void)
 cut selected windows into copy buffer
 
void checkMenuItem (Int item)
 
void unCheckMenuItem (Int item)
 
void setLayoutInit (AsciiString init)
 set layout init function name
 
void setLayoutUpdate (AsciiString update)
 set layout update function name
 
void setLayoutShutdown (AsciiString shutdown)
 set layout shutdown function name
 
AsciiString getLayoutInit (void)
 get layout init function name
 
AsciiString getLayoutUpdate (void)
 get layout update function name
 
AsciiString getLayoutShutdown (void)
 get layout shutdown function name
 

Protected Member Functions

char * saveAsDialog (void)
 save as standard browser
 
char * openDialog (void)
 open standard browser
 
void validateNames (GameWindow *root, char *filename, Bool *valid)
 
void updateRadioScreenIdentifiers (GameWindow *window, Int screenID)
 
Bool saveData (char *filePathAndFilename, char *filename)
 save data to file in filePath
 
Bool validateParentForCreate (GameWindow *parent)
 validate parent OK
 
void normalizeRegion (IRegion2D *region)
 normalize a region so that lo and hi are really lo and hi
 
WindowSelectionEntryfindSelectionEntry (GameWindow *window)
 find selection entry associated with this window
 

Protected Attributes

HINSTANCE m_appInst
 main application hInstance
 
HWND m_appHWnd
 main application hWnd
 
HWND m_statusBarHWnd
 status bar window handle
 
HWND m_toolbarHWnd
 toolbar window handle
 
EditMode m_mode
 the current editor "mode"
 
Bool m_unsaved
 TRUE when contents are unsaved.
 
char m_savePathAndFilename [_MAX_PATH]
 full path and filename to file
 
char m_saveFilename [_MAX_PATH]
 filename only with extension
 
WindowSelectionEntrym_selectList
 list of "selected" windows
 
GameWindowm_propertyTarget
 the window to edit properties on
 
Bool m_gridVisible
 TRUE when grid is visible.
 
Int m_gridResolution
 pixels between the grid marks
 
Bool m_snapToGrid
 TRUE when it's on.
 
RGBColorInt m_gridColor
 the grid draw color
 
Bool m_showHiddenOutlines
 show outlines around hidden windows
 
Bool m_showSeeThruOutlines
 show outliens around see-thru windows
 
AsciiString m_layoutInitString
 layout initi function name
 
AsciiString m_layoutUpdateString
 layout update function name
 
AsciiString m_layoutShutdownString
 layout shutdown function name
 

Detailed Description

Framework for GUI editor data

Definition at line 125 of file GUIEdit.h.

Constructor & Destructor Documentation

◆ GUIEdit()

GUIEdit::GUIEdit ( void )

Definition at line 414 of file GUIEdit.cpp.

◆ ~GUIEdit()

GUIEdit::~GUIEdit ( void )

Definition at line 448 of file GUIEdit.cpp.

Member Function Documentation

◆ bringSelectedToTop()

void GUIEdit::bringSelectedToTop ( void )

bring selected windows to top

Bring the selected windows to the top so they draw on top of other windows. For window with no parents this brings them to the top of the window stack for all windows, for child windows it will bring them to the top of the child list for their parent

Definition at line 4057 of file GUIEdit.cpp.

◆ checkMenuItem()

void GUIEdit::checkMenuItem ( Int item)

Check the menu item from the guiedit main menu

Definition at line 4577 of file GUIEdit.cpp.

◆ clearSelections()

void GUIEdit::clearSelections ( void )

clear selection list

Clear the entire selection list

Definition at line 3947 of file GUIEdit.cpp.

◆ clipCreationParamsToParent()

void GUIEdit::clipCreationParamsToParent ( GameWindow * parent,
Int * x,
Int * y,
Int * width,
Int * height )

when creating child windows we don't want them to exist outside the parent so we use this to clip them to the the parent size and locations

Definition at line 1316 of file GUIEdit.cpp.

◆ computeResizeLocation()

void GUIEdit::computeResizeLocation ( EditMode resizeMode,
GameWindow * window,
ICoord2D * resizeOrigin,
ICoord2D * resizeDest,
ICoord2D * resultLoc,
ICoord2D * resultSize )

compute new size of window using drag-resize logic

Given the current resize drag mode, the selected window to resize, the start location of the drag, and the end location of the drag, figure out what the upper left corner location and the size of the window should be

Definition at line 4339 of file GUIEdit.cpp.

◆ computeSafeLocation()

void GUIEdit::computeSafeLocation ( GameWindow * window,
Int x,
Int y,
Int * safeX,
Int * safeY )

given a position to move a window to, keep it onscreen and inside parent

If we attempt to move the window to the given (x,y) it may result in that location being either outside of the screen or outside of the parent. This method will compute a location as close to the desired (x,y) as possible but still remain within the parent and on the screen

Definition at line 4182 of file GUIEdit.cpp.

◆ computeSafeSizeLocation()

void GUIEdit::computeSafeSizeLocation ( GameWindow * window,
Int newX,
Int newY,
Int newWidth,
Int newHeight,
Int * safeX,
Int * safeY,
Int * safeWidth,
Int * safeHeight )

given position and size to move a window to, keep it inside parent and on screen

Like the method computeSafeLocation, this method also takes into account the new position AND size, keeping them within the screen and within any parents

NOTE: this assumes it is for the resizing code which assumes that the resize will not invert across the anchor point so we're only checking origin points and sizes compared to parents and the screen;

Location returned is relative to parent window if present

Definition at line 4266 of file GUIEdit.cpp.

◆ createStatusBar()

void GUIEdit::createStatusBar ( void )

create status bar

Create a status bar at the bottom of the editor

Definition at line 3347 of file GUIEdit.cpp.

◆ createToolbar()

void GUIEdit::createToolbar ( void )

create the toolbar

Create the toolbar for the editor

Definition at line 3406 of file GUIEdit.cpp.

◆ deleteAllWindows()

void GUIEdit::deleteAllWindows ( void )

delete all windows in the editor

Delete all windows in the editor

Definition at line 1376 of file GUIEdit.cpp.

◆ deleteSelected()

void GUIEdit::deleteSelected ( void )

delete selected windows

Delete the windows in the selection list

Definition at line 4015 of file GUIEdit.cpp.

◆ deleteWindow()

void GUIEdit::deleteWindow ( GameWindow * window)

delete a game window

Delete the window from the editor

Definition at line 1433 of file GUIEdit.cpp.

◆ dragMoveSelectedWindows()

void GUIEdit::dragMoveSelectedWindows ( ICoord2D * dragOrigin,
ICoord2D * dragDest )

move windows via drag move

Move all the windows in the selection list from a drag move, note that we are keeping the positions within the screen and parent windows

Definition at line 4109 of file GUIEdit.cpp.

◆ findSelectionEntry()

WindowSelectionEntry * GUIEdit::findSelectionEntry ( GameWindow * window)
protected

find selection entry associated with this window

Find selection entry for this window

Definition at line 297 of file GUIEdit.cpp.

◆ getFirstSelected()

GameWindow * GUIEdit::getFirstSelected ( void )

get first selected window

Get the first GameWindow * from the selection list

Definition at line 4165 of file GUIEdit.cpp.

◆ getGridColor()

RGBColorInt * GUIEdit::getGridColor ( void )
inline

Definition at line 369 of file GUIEdit.h.

◆ getGridResolution()

Int GUIEdit::getGridResolution ( void )
inline

Definition at line 363 of file GUIEdit.h.

◆ getInstance()

HINSTANCE GUIEdit::getInstance ( void )
inline

get application instance

Definition at line 355 of file GUIEdit.h.

◆ getLayoutInit()

AsciiString GUIEdit::getLayoutInit ( void )
inline

get layout init function name

Definition at line 375 of file GUIEdit.h.

◆ getLayoutShutdown()

AsciiString GUIEdit::getLayoutShutdown ( void )
inline

get layout shutdown function name

Definition at line 377 of file GUIEdit.h.

◆ getLayoutUpdate()

AsciiString GUIEdit::getLayoutUpdate ( void )
inline

get layout update function name

Definition at line 376 of file GUIEdit.h.

◆ getMode()

EditMode GUIEdit::getMode ( void )
inline

return the current mode

Definition at line 357 of file GUIEdit.h.

◆ getPropertyTarget()

GameWindow * GUIEdit::getPropertyTarget ( void )
inline

get window editing properties

Definition at line 359 of file GUIEdit.h.

◆ getSaveFilename()

char * GUIEdit::getSaveFilename ( void )
inline

Definition at line 360 of file GUIEdit.h.

◆ getSavePathAndFilename()

char * GUIEdit::getSavePathAndFilename ( void )
inline

Definition at line 361 of file GUIEdit.h.

◆ getSelectList()

WindowSelectionEntry * GUIEdit::getSelectList ( void )

get the selected list head

Return the selection list

Definition at line 4155 of file GUIEdit.cpp.

◆ getShowHiddenOutlines()

Bool GUIEdit::getShowHiddenOutlines ( void )
inline

Definition at line 370 of file GUIEdit.h.

◆ getShowSeeThruOutlines()

Bool GUIEdit::getShowSeeThruOutlines ( void )
inline

Definition at line 371 of file GUIEdit.h.

◆ getStatusBarWindowHandle()

HWND GUIEdit::getStatusBarWindowHandle ( void )
inline

get status bar HWND

Definition at line 356 of file GUIEdit.h.

◆ getWindowAtPos()

GameWindow * GUIEdit::getWindowAtPos ( Int x,
Int y )

get topmost window at pos

Given a mouse position, get the topmost window at that location

Definition at line 1222 of file GUIEdit.cpp.

◆ getWindowHandle()

HWND GUIEdit::getWindowHandle ( void )
inline

get window handle

Definition at line 354 of file GUIEdit.h.

◆ gridSnapLocation()

void GUIEdit::gridSnapLocation ( ICoord2D * source,
ICoord2D * snapped )

Given the source input point, return in 'snapped' the closest grid point

Definition at line 4562 of file GUIEdit.cpp.

◆ init()

void GUIEdit::init ( void )

initialize data

Initialize all the GUI edit data

Definition at line 478 of file GUIEdit.cpp.

◆ isGridSnapOn()

Bool GUIEdit::isGridSnapOn ( void )
inline

Definition at line 367 of file GUIEdit.h.

◆ isGridVisible()

Bool GUIEdit::isGridVisible ( void )
inline

Definition at line 365 of file GUIEdit.h.

◆ isNameDuplicate()

Bool GUIEdit::isNameDuplicate ( GameWindow * root,
GameWindow * ignore,
AsciiString name )

Is the name passed in found as the name of any window in in the tree starting at root ... but we will ignore the window 'ignore' if present

Definition at line 4611 of file GUIEdit.cpp.

◆ isWindowSelected()

Bool GUIEdit::isWindowSelected ( GameWindow * window)

is window selected

Is the window selected

Definition at line 3856 of file GUIEdit.cpp.

◆ loadGUIEditFontLibrary()

void GUIEdit::loadGUIEditFontLibrary ( FontLibrary * library)

fonts available in the editor

Load the set of fonts that we will make available to users in in the editor

Definition at line 4641 of file GUIEdit.cpp.

◆ menuCopy()

Bool GUIEdit::menuCopy ( void )

copy selected windows into copy buffer

Copy selected windows into clipboard

Definition at line 3785 of file GUIEdit.cpp.

◆ menuCut()

Bool GUIEdit::menuCut ( void )

cut selected windows into copy buffer

Cut selected windows into the clipboard

Definition at line 3824 of file GUIEdit.cpp.

◆ menuExit()

Bool GUIEdit::menuExit ( void )

exit application

The user clicked on exit in the menu and wishes to exit the editor

Definition at line 3439 of file GUIEdit.cpp.

◆ menuNew()

Bool GUIEdit::menuNew ( void )

start a new layout process

file->new menu option

Definition at line 3486 of file GUIEdit.cpp.

◆ menuOpen()

Bool GUIEdit::menuOpen ( void )

hit open on menu

User has clicked on file->open

Todo
should probably make the window manager interface for this a little nicer to tell us success and whatnot

Definition at line 3616 of file GUIEdit.cpp.

◆ menuPaste()

Bool GUIEdit::menuPaste ( void )

paste contents of copy buffer

Paste contents of clipboard into current layout

Definition at line 3813 of file GUIEdit.cpp.

◆ menuSave()

Bool GUIEdit::menuSave ( void )

hit save on menu

file->save menu option

Definition at line 3716 of file GUIEdit.cpp.

◆ menuSaveAs()

Bool GUIEdit::menuSaveAs ( void )

hit save as on menu

file->saveAs menu option

Definition at line 3747 of file GUIEdit.cpp.

◆ moveWindowTo()

void GUIEdit::moveWindowTo ( GameWindow * window,
Int x,
Int y )

move window

Move the window passed into the the absolute position (x,y), note that there is NO SAFE checking done on that position

Definition at line 4533 of file GUIEdit.cpp.

◆ newCheckBox()

GameWindow * GUIEdit::newCheckBox ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new check box

Definition at line 1687 of file GUIEdit.cpp.

◆ newComboBox()

GameWindow * GUIEdit::newComboBox ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new list box

@TODO: We still need to set the IME Composite Text colors in TheDefaultScheme

Definition at line 2475 of file GUIEdit.cpp.

◆ newHorizontalSlider()

GameWindow * GUIEdit::newHorizontalSlider ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new horizontal slider

Definition at line 2098 of file GUIEdit.cpp.

◆ newLayout()

Bool GUIEdit::newLayout ( void )

reset editor for new layout

Reset the editor for a new layout

Definition at line 3418 of file GUIEdit.cpp.

◆ newListbox()

GameWindow * GUIEdit::newListbox ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new list box

Definition at line 2890 of file GUIEdit.cpp.

◆ newProgressBar()

GameWindow * GUIEdit::newProgressBar ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new progress bar

Definition at line 2340 of file GUIEdit.cpp.

◆ newPushButton()

GameWindow * GUIEdit::newPushButton ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new push button

Definition at line 1595 of file GUIEdit.cpp.

◆ newRadioButton()

GameWindow * GUIEdit::newRadioButton ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new radio button

Definition at line 1792 of file GUIEdit.cpp.

◆ newStaticText()

GameWindow * GUIEdit::newStaticText ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new static text

Definition at line 3259 of file GUIEdit.cpp.

◆ newTabControl()

GameWindow * GUIEdit::newTabControl ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a tab control gadget

Definition at line 1900 of file GUIEdit.cpp.

◆ newTextEntry()

GameWindow * GUIEdit::newTextEntry ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new text entry

Definition at line 3153 of file GUIEdit.cpp.

◆ newUserWindow()

GameWindow * GUIEdit::newUserWindow ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new window at the given location

Definition at line 1537 of file GUIEdit.cpp.

◆ newVerticalSlider()

GameWindow * GUIEdit::newVerticalSlider ( GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new vertical slider

Definition at line 2219 of file GUIEdit.cpp.

◆ newWindow()

GameWindow * GUIEdit::newWindow ( UnsignedInt windowStyle,
GameWindow * parent,
Int x,
Int y,
Int width,
Int height )

Create a new window of the specified type. This is the single creation point for all windows created in the editor

Definition at line 1451 of file GUIEdit.cpp.

◆ normalizeRegion()

void GUIEdit::normalizeRegion ( IRegion2D * region)
protected

normalize a region so that lo and hi are really lo and hi

Normalize the region so that lo and hi are actually lo and hi

Definition at line 325 of file GUIEdit.cpp.

◆ notifyNewWindow()

void GUIEdit::notifyNewWindow ( GameWindow * window)

this is called after a window is added to the editor, the window may contain children so this might be recursively called from inside

The passed in window has just been added into the GUI layout. It It may also contain children which we will recursively call upon so that every window gets a chance to run through this method

Definition at line 3981 of file GUIEdit.cpp.

◆ openDialog()

char * GUIEdit::openDialog ( void )
protected

open standard browser

Bring up the standard windows browser open dialog and return filename selected

Definition at line 164 of file GUIEdit.cpp.

◆ readConfigFile()

Bool GUIEdit::readConfigFile ( char * filename)

read the configuration file

Read the guiedit config file

Definition at line 806 of file GUIEdit.cpp.

◆ readFontFile()

void GUIEdit::readFontFile ( char * filename)

read file with available font definitions

Read the font file defintitions and load them

Definition at line 871 of file GUIEdit.cpp.

◆ removeWindowCleanup()

void GUIEdit::removeWindowCleanup ( GameWindow * window)

to cleanup before delete

This is called on each window before it is deleted or removed from the active windows in the editor to allow the system to cleanup before the delete

Definition at line 1397 of file GUIEdit.cpp.

◆ revertDefaultCallbacks()

void GUIEdit::revertDefaultCallbacks ( GameWindow * root)

after a load

After a load, we will restore default callbacks to all user windows loaded from the file

Definition at line 3587 of file GUIEdit.cpp.

◆ saveAsDialog()

char * GUIEdit::saveAsDialog ( void )
protected

save as standard browser

Bring up the standard windows browser save as dialog and return filename selected

Definition at line 122 of file GUIEdit.cpp.

◆ saveData()

Bool GUIEdit::saveData ( char * filePathAndFilename,
char * filename )
protected

save data to file in filePath

Save all our data to the file specified in filePath, which is a full absolute path to a filename

Definition at line 1202 of file Save.cpp.

◆ selectionCount()

Int GUIEdit::selectionCount ( void )

return # of selected windows

How many items are selected

Definition at line 3958 of file GUIEdit.cpp.

◆ selectWindow()

void GUIEdit::selectWindow ( GameWindow * window)

add to selection list

Add window to selection list

Definition at line 3876 of file GUIEdit.cpp.

◆ selectWindowsInRegion()

void GUIEdit::selectWindowsInRegion ( IRegion2D * region)

select the windows that are FULLY in the region specified

Select all the windows that are fully in the region

Definition at line 364 of file GUIEdit.cpp.

◆ setCursor()

void GUIEdit::setCursor ( CursorType type)

set cursor

Set the cursor to the specified type

Definition at line 1084 of file GUIEdit.cpp.

◆ setGridColor()

void GUIEdit::setGridColor ( RGBColorInt * color)
inline

Definition at line 368 of file GUIEdit.h.

◆ setGridResolution()

void GUIEdit::setGridResolution ( Int res)
inline

Definition at line 362 of file GUIEdit.h.

◆ setGridSnap()

void GUIEdit::setGridSnap ( Bool on)
inline

Definition at line 366 of file GUIEdit.h.

◆ setGridVisible()

void GUIEdit::setGridVisible ( Bool visible)
inline

Definition at line 364 of file GUIEdit.h.

◆ setLayoutInit()

void GUIEdit::setLayoutInit ( AsciiString init)
inline

set layout init function name

Definition at line 372 of file GUIEdit.h.

◆ setLayoutShutdown()

void GUIEdit::setLayoutShutdown ( AsciiString shutdown)
inline

set layout shutdown function name

Definition at line 374 of file GUIEdit.h.

◆ setLayoutUpdate()

void GUIEdit::setLayoutUpdate ( AsciiString update)
inline

set layout update function name

Definition at line 373 of file GUIEdit.h.

◆ setMode()

void GUIEdit::setMode ( EditMode mode)

set the new mode

Set a new mode for the editor

Definition at line 973 of file GUIEdit.cpp.

◆ setPropertyTarget()

void GUIEdit::setPropertyTarget ( GameWindow * window)
inline

set window for property editing

Definition at line 358 of file GUIEdit.h.

◆ setSaveFile()

void GUIEdit::setSaveFile ( char * fullPathAndFilename)

set filename to use for saving

Set our member variables for the full path and filename passed in to this method. We will also extract the filename only from the full path and save that separately

Definition at line 251 of file GUIEdit.cpp.

◆ setShowHiddenOutlines()

void GUIEdit::setShowHiddenOutlines ( Bool show)

Definition at line 4662 of file GUIEdit.cpp.

◆ setShowSeeThruOutlines()

void GUIEdit::setShowSeeThruOutlines ( Bool show)

Definition at line 4676 of file GUIEdit.cpp.

◆ setUnsaved()

void GUIEdit::setUnsaved ( Bool unsaved)

set unsaved flag to FALSE or TRUE

Set the current contents of the editor as either saved or unsaved, when we're entering an unsaved state we will put a marker in the title bar of the app, when leaving an unsaved state we will remove that marker

Definition at line 208 of file GUIEdit.cpp.

◆ shutdown()

void GUIEdit::shutdown ( void )

shutdown all our data

Shutdown our GUI edit application

Definition at line 628 of file GUIEdit.cpp.

◆ statusMessage()

void GUIEdit::statusMessage ( StatusPart part,
char * message )

set status bar textl

Set a message in the status bar

Definition at line 3385 of file GUIEdit.cpp.

◆ stripNameDecorations()

void GUIEdit::stripNameDecorations ( GameWindow * root)

after a load

Strip name decorations of the entire tree of windows

Definition at line 3540 of file GUIEdit.cpp.

◆ unCheckMenuItem()

void GUIEdit::unCheckMenuItem ( Int item)

Un-check the menu item from the guiedit main menu

Definition at line 4593 of file GUIEdit.cpp.

◆ unSelectWindow()

void GUIEdit::unSelectWindow ( GameWindow * window)

remove from selection list

Remove window from the selection list

Definition at line 3916 of file GUIEdit.cpp.

◆ update()

void GUIEdit::update ( void )

process the universe

Update method for our GUI edit application

Definition at line 723 of file GUIEdit.cpp.

◆ updateRadioScreenIdentifiers()

void GUIEdit::updateRadioScreenIdentifiers ( GameWindow * window,
Int screenID )
protected

update all radio button screen identifiers with the new identifier

Definition at line 1153 of file Save.cpp.

◆ validateNames()

void GUIEdit::validateNames ( GameWindow * root,
char * filename,
Bool * valid )
protected

Stored in the m_decorated field for each window is a name given by the user. When we write this name into the window file it will be prefixed by the filename and a : such as (MainMenu.wnd:OKButton). When we re-load these window definitions the whole decorated name will be read and loaded into the decorated name field, therefore we must make sure the entire name once decorated will fit into the field

Definition at line 1095 of file Save.cpp.

◆ validateParentForCreate()

Bool GUIEdit::validateParentForCreate ( GameWindow * parent)
protected

validate parent OK

This method is used when creating new windows and gadgets, if a parent is present, that parent cannot be a GUI gadget because those gadgets are atomic units, they can not contain user defined children

Definition at line 272 of file GUIEdit.cpp.

◆ windowIsGadget()

Bool GUIEdit::windowIsGadget ( GameWindow * window)

is the window a gadget

Return TRUE if this window is one of our predefined gadtet types

Definition at line 4547 of file GUIEdit.cpp.

◆ writeConfigFile()

Bool GUIEdit::writeConfigFile ( char * filename)

write the configuration file

Write the guiedit config file

Definition at line 751 of file GUIEdit.cpp.

◆ writeFontFile()

void GUIEdit::writeFontFile ( char * filename)

write all loaded fonts to a file

If we can, write a file containing a definition of all the fonts we have loaded

Definition at line 939 of file GUIEdit.cpp.

Member Data Documentation

◆ m_appHWnd

HWND GUIEdit::m_appHWnd
protected

main application hWnd

Definition at line 326 of file GUIEdit.h.

◆ m_appInst

HINSTANCE GUIEdit::m_appInst
protected

main application hInstance

Definition at line 325 of file GUIEdit.h.

◆ m_gridColor

RGBColorInt GUIEdit::m_gridColor
protected

the grid draw color

Definition at line 342 of file GUIEdit.h.

◆ m_gridResolution

Int GUIEdit::m_gridResolution
protected

pixels between the grid marks

Definition at line 340 of file GUIEdit.h.

◆ m_gridVisible

Bool GUIEdit::m_gridVisible
protected

TRUE when grid is visible.

Definition at line 339 of file GUIEdit.h.

◆ m_layoutInitString

AsciiString GUIEdit::m_layoutInitString
protected

layout initi function name

Definition at line 347 of file GUIEdit.h.

◆ m_layoutShutdownString

AsciiString GUIEdit::m_layoutShutdownString
protected

layout shutdown function name

Definition at line 349 of file GUIEdit.h.

◆ m_layoutUpdateString

AsciiString GUIEdit::m_layoutUpdateString
protected

layout update function name

Definition at line 348 of file GUIEdit.h.

◆ m_mode

EditMode GUIEdit::m_mode
protected

the current editor "mode"

Definition at line 330 of file GUIEdit.h.

◆ m_propertyTarget

GameWindow* GUIEdit::m_propertyTarget
protected

the window to edit properties on

Definition at line 337 of file GUIEdit.h.

◆ m_saveFilename

char GUIEdit::m_saveFilename[_MAX_PATH]
protected

filename only with extension

Definition at line 334 of file GUIEdit.h.

◆ m_savePathAndFilename

char GUIEdit::m_savePathAndFilename[_MAX_PATH]
protected

full path and filename to file

Definition at line 333 of file GUIEdit.h.

◆ m_selectList

WindowSelectionEntry* GUIEdit::m_selectList
protected

list of "selected" windows

Definition at line 336 of file GUIEdit.h.

◆ m_showHiddenOutlines

Bool GUIEdit::m_showHiddenOutlines
protected

show outlines around hidden windows

Definition at line 344 of file GUIEdit.h.

◆ m_showSeeThruOutlines

Bool GUIEdit::m_showSeeThruOutlines
protected

show outliens around see-thru windows

Definition at line 345 of file GUIEdit.h.

◆ m_snapToGrid

Bool GUIEdit::m_snapToGrid
protected

TRUE when it's on.

Definition at line 341 of file GUIEdit.h.

◆ m_statusBarHWnd

HWND GUIEdit::m_statusBarHWnd
protected

status bar window handle

Definition at line 327 of file GUIEdit.h.

◆ m_toolbarHWnd

HWND GUIEdit::m_toolbarHWnd
protected

toolbar window handle

Definition at line 328 of file GUIEdit.h.

◆ m_unsaved

Bool GUIEdit::m_unsaved
protected

TRUE when contents are unsaved.

Definition at line 331 of file GUIEdit.h.


The documentation for this class was generated from the following files: