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

#include <ObjectOptions.h>

Inherits COptionsPanel.

Public Types

enum  { NAME_MAX_LEN = 64 }
 
enum  { IDD = IDD_OBJECT_OPTIONS }
 
- Public Types inherited from COptionsPanel
enum  { IDD = IDD_NO_OPTIONS }
 

Public Member Functions

 ObjectOptions (CWnd *pParent=NULL)
 standard constructor
 
 ~ObjectOptions (void)
 standard destructor
 
- Public Member Functions inherited from COptionsPanel
 COptionsPanel (Int dlgid=0, CWnd *pParent=NULL)
 

Static Public Member Functions

static const char * getCurObjectName (void)
 
static MapObjectduplicateCurMapObjectForPlace (const Coord3D *loc, Real angle, Bool checkPlayers=true)
 
static MapObjectgetObjectNamed (AsciiString name)
 
static Int getObjectNamedIndex (const AsciiString &name)
 
static void selectObject (const MapObject *pObj)
 
static Real getCurObjectHeight (void)
 
static void update ()
 
static AsciiString getCurGdfName (void)
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 
virtual void OnOK ()
 
virtual void OnCancel ()
 Modeless dialogs don't OK, so eat this for modeless.
 
virtual BOOL OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult)
 Modeless dialogs don't close on ESC, so eat this for modeless.
 
virtual BOOL OnInitDialog ()
 Setup the controls in the dialog.
 
afx_msg void OnEditchangeOwningteam ()
 
afx_msg void OnCloseupOwningteam ()
 
afx_msg void OnSelchangeOwningteam ()
 
void addObject (MapObject *mapObject, const char *pPath, Int objectNdx, HTREEITEM parent)
 
HTREEITEM findOrAdd (HTREEITEM parent, const char *pLabel)
 
HTREEITEM findOrDont (const char *pLabel)
 
HTREEITEM _FindOrDont (const char *pLabel, HTREEITEM startPoint)
 
Bool setObjectTreeViewSelection (HTREEITEM parent, Int selection)
 Set the selected object in the tree view.
 
void updateLabel ()
 
- Protected Member Functions inherited from COptionsPanel
afx_msg void OnMove (int x, int y)
 
afx_msg void OnEditRedo ()
 
afx_msg void OnUpdateEditRedo (CCmdUI *pCmdUI)
 
afx_msg void OnEditUndo ()
 
afx_msg void OnUpdateEditUndo (CCmdUI *pCmdUI)
 

Static Protected Member Functions

static MapObjectgetCurMapObject (void)
 

Protected Attributes

CTreeCtrl m_objectTreeView
 
MapObjectm_objectsList
 
ObjectPreview m_objectPreview
 

Static Protected Attributes

static ObjectOptionsm_staticThis = NULL
 
static Bool m_updating = false
 
static Int m_currentObjectIndex =-1
 
static char m_currentObjectName [NAME_MAX_LEN]
 
static AsciiString m_curOwnerName
 

Detailed Description

Definition at line 36 of file ObjectOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 46 of file ObjectOptions.h.

◆ anonymous enum

anonymous enum
Enumerator
NAME_MAX_LEN 

Definition at line 43 of file ObjectOptions.h.

Constructor & Destructor Documentation

◆ ObjectOptions()

ObjectOptions::ObjectOptions ( CWnd * pParent = NULL)

standard constructor

Definition at line 54 of file ObjectOptions.cpp.

◆ ~ObjectOptions()

ObjectOptions::~ObjectOptions ( void )

standard destructor

Definition at line 65 of file ObjectOptions.cpp.

Member Function Documentation

◆ _FindOrDont()

HTREEITEM ObjectOptions::_FindOrDont ( const char * pLabel,
HTREEITEM startPoint )
protected

Definition at line 414 of file ObjectOptions.cpp.

◆ addObject()

void ObjectOptions::addObject ( MapObject * mapObject,
const char * pPath,
Int terrainNdx,
HTREEITEM parent )
protected

Add the object hierarchy paths to the tree view.

Definition at line 456 of file ObjectOptions.cpp.

◆ DoDataExchange()

void ObjectOptions::DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Reimplemented from COptionsPanel.

Definition at line 74 of file ObjectOptions.cpp.

◆ duplicateCurMapObjectForPlace()

MapObject * ObjectOptions::duplicateCurMapObjectForPlace ( const Coord3D * loc,
Real angle,
Bool checkPlayers = true )
static

Definition at line 654 of file ObjectOptions.cpp.

◆ findOrAdd()

HTREEITEM ObjectOptions::findOrAdd ( HTREEITEM parent,
const char * pLabel )
protected

Locate the child item in tree item parent with name pLabel. If not found, add it. Either way, return child.

Definition at line 379 of file ObjectOptions.cpp.

◆ findOrDont()

HTREEITEM ObjectOptions::findOrDont ( const char * pLabel)
protected

Definition at line 409 of file ObjectOptions.cpp.

◆ getCurGdfName()

AsciiString ObjectOptions::getCurGdfName ( void )
static

Definition at line 645 of file ObjectOptions.cpp.

◆ getCurMapObject()

MapObject * ObjectOptions::getCurMapObject ( void )
staticprotected

Definition at line 629 of file ObjectOptions.cpp.

◆ getCurObjectHeight()

Real ObjectOptions::getCurObjectHeight ( void )
static

Definition at line 727 of file ObjectOptions.cpp.

◆ getCurObjectName()

static const char * ObjectOptions::getCurObjectName ( void )
inlinestatic

Definition at line 96 of file ObjectOptions.h.

◆ getObjectNamed()

MapObject * ObjectOptions::getObjectNamed ( AsciiString name)
static

Definition at line 744 of file ObjectOptions.cpp.

◆ getObjectNamedIndex()

Int ObjectOptions::getObjectNamedIndex ( const AsciiString & name)
static

Definition at line 770 of file ObjectOptions.cpp.

◆ OnCancel()

virtual void ObjectOptions::OnCancel ( )
inlineprotectedvirtual

Modeless dialogs don't OK, so eat this for modeless.

Definition at line 57 of file ObjectOptions.h.

◆ OnCloseupOwningteam()

void ObjectOptions::OnCloseupOwningteam ( )
protected

Definition at line 838 of file ObjectOptions.cpp.

◆ OnEditchangeOwningteam()

void ObjectOptions::OnEditchangeOwningteam ( )
protected

Definition at line 797 of file ObjectOptions.cpp.

◆ OnInitDialog()

BOOL ObjectOptions::OnInitDialog ( )
protectedvirtual

Setup the controls in the dialog.

Definition at line 230 of file ObjectOptions.cpp.

◆ OnNotify()

BOOL ObjectOptions::OnNotify ( WPARAM wParam,
LPARAM lParam,
LRESULT * pResult )
protectedvirtual

Modeless dialogs don't close on ESC, so eat this for modeless.

Definition at line 587 of file ObjectOptions.cpp.

◆ OnOK()

virtual void ObjectOptions::OnOK ( )
inlineprotectedvirtual

Definition at line 56 of file ObjectOptions.h.

◆ OnSelchangeOwningteam()

void ObjectOptions::OnSelchangeOwningteam ( )
protected

Definition at line 843 of file ObjectOptions.cpp.

◆ selectObject()

void ObjectOptions::selectObject ( const MapObject * pObj)
static

Definition at line 813 of file ObjectOptions.cpp.

◆ setObjectTreeViewSelection()

Bool ObjectOptions::setObjectTreeViewSelection ( HTREEITEM parent,
Int selection )
protected

Set the selected object in the tree view.

Definition at line 559 of file ObjectOptions.cpp.

◆ update()

void ObjectOptions::update ( )
static

Definition at line 111 of file ObjectOptions.cpp.

◆ updateLabel()

void ObjectOptions::updateLabel ( )
protected

Definition at line 118 of file ObjectOptions.cpp.

Member Data Documentation

◆ m_curOwnerName

AsciiString ObjectOptions::m_curOwnerName
staticprotected

Definition at line 79 of file ObjectOptions.h.

◆ m_currentObjectIndex

Int ObjectOptions::m_currentObjectIndex =-1
staticprotected

Definition at line 77 of file ObjectOptions.h.

◆ m_currentObjectName

char ObjectOptions::m_currentObjectName
staticprotected

Definition at line 78 of file ObjectOptions.h.

◆ m_objectPreview

ObjectPreview ObjectOptions::m_objectPreview
protected

Definition at line 83 of file ObjectOptions.h.

◆ m_objectsList

MapObject* ObjectOptions::m_objectsList
protected

Definition at line 82 of file ObjectOptions.h.

◆ m_objectTreeView

CTreeCtrl ObjectOptions::m_objectTreeView
protected

Definition at line 81 of file ObjectOptions.h.

◆ m_staticThis

ObjectOptions * ObjectOptions::m_staticThis = NULL
staticprotected

Definition at line 75 of file ObjectOptions.h.

◆ m_updating

Bool ObjectOptions::m_updating = false
staticprotected

Definition at line 76 of file ObjectOptions.h.


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