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

#include <RoadOptions.h>

Inherits COptionsPanel.

Public Types

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

Public Member Functions

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

Static Public Member Functions

static AsciiString getCurRoadName (void)
 
static Bool isBridge (void)
 
static Bool isAngled (void)
 
static Bool isTightCurve (void)
 
static Bool isJoin (void)
 
static void updateSelection (void)
 
static Bool selectionIsRoadsOnly (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 OnTightCurve ()
 
afx_msg void OnAngled ()
 
afx_msg void OnBroadCurve ()
 
afx_msg void OnJoin ()
 
afx_msg void OnApplyRoad ()
 
void addRoad (char *pPath, Int objectNdx, HTREEITEM parent)
 
HTREEITEM findOrAdd (HTREEITEM parent, char *pLabel)
 
Bool findAndSelect (HTREEITEM parent, AsciiString label)
 
Bool setRoadTreeViewSelection (HTREEITEM parent, Int selection)
 Set the selected road in the tree view.
 
void updateLabel (void)
 
void ChangeRoadType (AsciiString newRoad)
 
void SelectConnected (void)
 
- 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)
 

Protected Attributes

CTreeCtrl m_roadTreeView
 

Static Protected Attributes

static RoadOptionsm_staticThis = NULL
 
static Bool m_updating = false
 
static Int m_currentRoadIndex =0
 
static Int m_numberOfRoads =0
 
static Int m_numberOfBridges =0
 
static AsciiString m_currentRoadName
 
static Bool m_angleCorners = false
 angled or curved.
 
static Bool m_tightCurve = false
 Broad curve false, tight curve true.
 
static Bool m_doJoin = false
 Is a join to different road type.
 

Detailed Description

Definition at line 36 of file RoadOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
NAME_MAX_LEN 

Definition at line 43 of file RoadOptions.h.

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 46 of file RoadOptions.h.

Constructor & Destructor Documentation

◆ RoadOptions()

RoadOptions::RoadOptions ( CWnd * pParent = NULL)

standard constructor

Definition at line 51 of file RoadOptions.cpp.

◆ ~RoadOptions()

RoadOptions::~RoadOptions ( void )

standard destructor

Definition at line 60 of file RoadOptions.cpp.

Member Function Documentation

◆ addRoad()

void RoadOptions::addRoad ( char * pPath,
Int terrainNdx,
HTREEITEM parent )
protected

Add the road hierarchy paths to the tree view.

Definition at line 372 of file RoadOptions.cpp.

◆ applyToSelection()

void RoadOptions::applyToSelection ( void )

Applies road corner flags and road type to selection.

Definition at line 192 of file RoadOptions.cpp.

◆ ChangeRoadType()

void RoadOptions::ChangeRoadType ( AsciiString newRoad)
protected

Definition at line 528 of file RoadOptions.cpp.

◆ DoDataExchange()

void RoadOptions::DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Reimplemented from COptionsPanel.

Definition at line 66 of file RoadOptions.cpp.

◆ findAndSelect()

Bool RoadOptions::findAndSelect ( HTREEITEM parent,
AsciiString label )
protected

Locate and select child item in tree item parent with name pLabel. If not found, false. If found, return true.

Definition at line 347 of file RoadOptions.cpp.

◆ findOrAdd()

HTREEITEM RoadOptions::findOrAdd ( HTREEITEM parent,
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 315 of file RoadOptions.cpp.

◆ getCurRoadName()

static AsciiString RoadOptions::getCurRoadName ( void )
inlinestatic

Definition at line 98 of file RoadOptions.h.

◆ isAngled()

static Bool RoadOptions::isAngled ( void )
inlinestatic

Definition at line 100 of file RoadOptions.h.

◆ isBridge()

static Bool RoadOptions::isBridge ( void )
inlinestatic

Definition at line 99 of file RoadOptions.h.

◆ isJoin()

static Bool RoadOptions::isJoin ( void )
inlinestatic

Definition at line 102 of file RoadOptions.h.

◆ isTightCurve()

static Bool RoadOptions::isTightCurve ( void )
inlinestatic

Definition at line 101 of file RoadOptions.h.

◆ OnAngled()

void RoadOptions::OnAngled ( )
protected

Definition at line 581 of file RoadOptions.cpp.

◆ OnApplyRoad()

void RoadOptions::OnApplyRoad ( )
protected

Definition at line 610 of file RoadOptions.cpp.

◆ OnBroadCurve()

void RoadOptions::OnBroadCurve ( )
protected

Definition at line 588 of file RoadOptions.cpp.

◆ OnCancel()

virtual void RoadOptions::OnCancel ( )
inlineprotectedvirtual

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

Definition at line 57 of file RoadOptions.h.

◆ OnInitDialog()

BOOL RoadOptions::OnInitDialog ( )
protectedvirtual

Setup the controls in the dialog.

Definition at line 212 of file RoadOptions.cpp.

◆ OnJoin()

void RoadOptions::OnJoin ( )
protected

Definition at line 595 of file RoadOptions.cpp.

◆ OnNotify()

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

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

Definition at line 538 of file RoadOptions.cpp.

◆ OnOK()

virtual void RoadOptions::OnOK ( )
inlineprotectedvirtual

Definition at line 56 of file RoadOptions.h.

◆ OnTightCurve()

void RoadOptions::OnTightCurve ( )
protected

Definition at line 574 of file RoadOptions.cpp.

◆ SelectConnected()

void RoadOptions::SelectConnected ( void )
protected

Definition at line 447 of file RoadOptions.cpp.

◆ selectionIsRoadsOnly()

Bool RoadOptions::selectionIsRoadsOnly ( void )
static

Returns true if only one or more roads is selected.

Definition at line 100 of file RoadOptions.cpp.

◆ setRoadTreeViewSelection()

Bool RoadOptions::setRoadTreeViewSelection ( HTREEITEM parent,
Int selection )
protected

Set the selected road in the tree view.

Definition at line 422 of file RoadOptions.cpp.

◆ updateLabel()

void RoadOptions::updateLabel ( void )
protected

Definition at line 89 of file RoadOptions.cpp.

◆ updateSelection()

void RoadOptions::updateSelection ( void )
static

Returns true if only one or more roads is selected.

Definition at line 119 of file RoadOptions.cpp.

Member Data Documentation

◆ m_angleCorners

Bool RoadOptions::m_angleCorners = false
staticprotected

angled or curved.

Definition at line 83 of file RoadOptions.h.

◆ m_currentRoadIndex

Int RoadOptions::m_currentRoadIndex =0
staticprotected

Definition at line 79 of file RoadOptions.h.

◆ m_currentRoadName

AsciiString RoadOptions::m_currentRoadName
staticprotected

Definition at line 82 of file RoadOptions.h.

◆ m_doJoin

Bool RoadOptions::m_doJoin = false
staticprotected

Is a join to different road type.

Definition at line 85 of file RoadOptions.h.

◆ m_numberOfBridges

Int RoadOptions::m_numberOfBridges =0
staticprotected

Definition at line 81 of file RoadOptions.h.

◆ m_numberOfRoads

Int RoadOptions::m_numberOfRoads =0
staticprotected

Definition at line 80 of file RoadOptions.h.

◆ m_roadTreeView

CTreeCtrl RoadOptions::m_roadTreeView
protected

Definition at line 86 of file RoadOptions.h.

◆ m_staticThis

RoadOptions * RoadOptions::m_staticThis = NULL
staticprotected

Definition at line 77 of file RoadOptions.h.

◆ m_tightCurve

Bool RoadOptions::m_tightCurve = false
staticprotected

Broad curve false, tight curve true.

Definition at line 84 of file RoadOptions.h.

◆ m_updating

Bool RoadOptions::m_updating = false
staticprotected

Definition at line 78 of file RoadOptions.h.


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