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

#include <TerrainMaterial.h>

Inherits COptionsPanel, and PopupSliderOwner.

Public Types

enum  { IDD = IDD_TERRAIN_MATERIAL }
 
- Public Types inherited from COptionsPanel
enum  { IDD = IDD_NO_OPTIONS }
 

Public Member Functions

 TerrainMaterial (CWnd *pParent=NULL)
 
Bool setTerrainTreeViewSelection (HTREEITEM parent, Int selection)
 Set the selected texture in the tree view.
 
virtual void GetPopSliderInfo (const long sliderID, long *pMin, long *pMax, long *pLineSize, long *pInitial)
 
virtual void PopSliderChanged (const long sliderID, long theVal)
 
virtual void PopSliderFinished (const long sliderID, long theVal)
 
- Public Member Functions inherited from COptionsPanel
 COptionsPanel (Int dlgid=0, CWnd *pParent=NULL)
 

Static Public Member Functions

static Int getFgTexClass (void)
 
static Int getBgTexClass (void)
 
static void setFgTexClass (Int texClass)
 Set foreground texture and invalidate swatches.
 
static void setBgTexClass (Int texClass)
 Set backgroundground texture and invalidate swatches.
 
static void updateTextures (WorldHeightMapEdit *pMap)
 
static void updateTextureSelection (void)
 
static void setToolOptions (Bool singleCell)
 Sets the tool option - single & multi tile use this panel,.
 
static void setWidth (Int width)
 Sets the setWidth value in the dialog.
 
static Bool isPaintingPathingInfo (void)
 
static Bool isPaintingPassable (void)
 

Protected Types

enum  { MIN_TILE_SIZE =2 , MAX_TILE_SIZE = 100 }
 

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 OnSwapTextures ()
 
afx_msg void OnChangeSizeEdit ()
 Handles width edit ui messages.
 
afx_msg void OnImpassable ()
 
afx_msg void OnPassableCheck ()
 
afx_msg void OnPassable ()
 
void addTerrain (char *pPath, Int terrainNdx, HTREEITEM parent)
 
HTREEITEM findOrAdd (HTREEITEM parent, char *pLabel)
 
void updateLabel (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

Bool m_updating
 
CTreeCtrl m_terrainTreeView
 
TerrainSwatches m_terrainSwatches
 
WBPopupSliderButton m_widthPopup
 
Int m_currentWidth
 

Static Protected Attributes

static TerrainMaterialm_staticThis = NULL
 
static Int m_currentFgTexture
 
static Int m_currentBgTexture
 
static Bool m_paintingPathingInfo
 
static Bool m_paintingPassable
 

Detailed Description

Definition at line 35 of file TerrainMaterial.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 43 of file TerrainMaterial.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
MIN_TILE_SIZE 
MAX_TILE_SIZE 

Definition at line 60 of file TerrainMaterial.h.

Constructor & Destructor Documentation

◆ TerrainMaterial()

TerrainMaterial::TerrainMaterial ( CWnd * pParent = NULL)

Definition at line 49 of file TerrainMaterial.cpp.

Member Function Documentation

◆ addTerrain()

void TerrainMaterial::addTerrain ( char * pPath,
Int terrainNdx,
HTREEITEM parent )
protected

Add the terrain path to the tree view.

Definition at line 275 of file TerrainMaterial.cpp.

◆ DoDataExchange()

void TerrainMaterial::DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Reimplemented from COptionsPanel.

Definition at line 59 of file TerrainMaterial.cpp.

◆ findOrAdd()

HTREEITEM TerrainMaterial::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 244 of file TerrainMaterial.cpp.

◆ getBgTexClass()

static Int TerrainMaterial::getBgTexClass ( void )
inlinestatic

Definition at line 93 of file TerrainMaterial.h.

◆ getFgTexClass()

static Int TerrainMaterial::getFgTexClass ( void )
inlinestatic

Definition at line 92 of file TerrainMaterial.h.

◆ GetPopSliderInfo()

void TerrainMaterial::GetPopSliderInfo ( const long sliderID,
long * pMin,
long * pMax,
long * pLineSize,
long * pInitial )
virtual

Implements PopupSliderOwner.

Definition at line 416 of file TerrainMaterial.cpp.

◆ isPaintingPassable()

static Bool TerrainMaterial::isPaintingPassable ( void )
inlinestatic

Definition at line 103 of file TerrainMaterial.h.

◆ isPaintingPathingInfo()

static Bool TerrainMaterial::isPaintingPathingInfo ( void )
inlinestatic

Definition at line 102 of file TerrainMaterial.h.

◆ OnCancel()

virtual void TerrainMaterial::OnCancel ( )
inlineprotectedvirtual

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

Definition at line 54 of file TerrainMaterial.h.

◆ OnChangeSizeEdit()

void TerrainMaterial::OnChangeSizeEdit ( )
protected

Handles width edit ui messages.

Gets the new edit control text, converts it to an int, then updates the slider and brush tool.

Definition at line 396 of file TerrainMaterial.cpp.

◆ OnImpassable()

void TerrainMaterial::OnImpassable ( )
protected

Definition at line 513 of file TerrainMaterial.cpp.

◆ OnInitDialog()

BOOL TerrainMaterial::OnInitDialog ( )
protectedvirtual

Setup the controls in the dialog.

Definition at line 201 of file TerrainMaterial.cpp.

◆ OnNotify()

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

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

Definition at line 464 of file TerrainMaterial.cpp.

◆ OnOK()

virtual void TerrainMaterial::OnOK ( )
inlineprotectedvirtual

Definition at line 53 of file TerrainMaterial.h.

◆ OnPassable()

void TerrainMaterial::OnPassable ( )
protected

Definition at line 549 of file TerrainMaterial.cpp.

◆ OnPassableCheck()

void TerrainMaterial::OnPassableCheck ( )
protected

Definition at line 520 of file TerrainMaterial.cpp.

◆ OnSwapTextures()

void TerrainMaterial::OnSwapTextures ( )
protected

Swap the foreground and background textures.

Definition at line 383 of file TerrainMaterial.cpp.

◆ PopSliderChanged()

void TerrainMaterial::PopSliderChanged ( const long sliderID,
long theVal )
virtual

Implements PopupSliderOwner.

Definition at line 432 of file TerrainMaterial.cpp.

◆ PopSliderFinished()

void TerrainMaterial::PopSliderFinished ( const long sliderID,
long theVal )
virtual

Implements PopupSliderOwner.

Definition at line 451 of file TerrainMaterial.cpp.

◆ setBgTexClass()

void TerrainMaterial::setBgTexClass ( Int texClass)
static

Set backgroundground texture and invalidate swatches.

Definition at line 93 of file TerrainMaterial.cpp.

◆ setFgTexClass()

void TerrainMaterial::setFgTexClass ( Int texClass)
static

Set foreground texture and invalidate swatches.

Definition at line 82 of file TerrainMaterial.cpp.

◆ setTerrainTreeViewSelection()

Bool TerrainMaterial::setTerrainTreeViewSelection ( HTREEITEM parent,
Int selection )

Set the selected texture in the tree view.

Definition at line 172 of file TerrainMaterial.cpp.

◆ setToolOptions()

void TerrainMaterial::setToolOptions ( Bool singleCell)
static

Sets the tool option - single & multi tile use this panel,.

Update the ui for the tool.

Definition at line 117 of file TerrainMaterial.cpp.

◆ setWidth()

void TerrainMaterial::setWidth ( Int width)
static

Sets the setWidth value in the dialog.

Update the value in the edit control and the slider.

Definition at line 103 of file TerrainMaterial.cpp.

◆ updateLabel()

void TerrainMaterial::updateLabel ( void )
protected

Definition at line 137 of file TerrainMaterial.cpp.

◆ updateTextures()

void TerrainMaterial::updateTextures ( WorldHeightMapEdit * pMap)
static

Definition at line 362 of file TerrainMaterial.cpp.

◆ updateTextureSelection()

void TerrainMaterial::updateTextureSelection ( void )
static

Definition at line 163 of file TerrainMaterial.cpp.

Member Data Documentation

◆ m_currentBgTexture

Int TerrainMaterial::m_currentBgTexture
staticprotected

Definition at line 77 of file TerrainMaterial.h.

◆ m_currentFgTexture

Int TerrainMaterial::m_currentFgTexture
staticprotected

Definition at line 76 of file TerrainMaterial.h.

◆ m_currentWidth

Int TerrainMaterial::m_currentWidth
protected

Definition at line 81 of file TerrainMaterial.h.

◆ m_paintingPassable

Bool TerrainMaterial::m_paintingPassable
staticprotected

Definition at line 84 of file TerrainMaterial.h.

◆ m_paintingPathingInfo

Bool TerrainMaterial::m_paintingPathingInfo
staticprotected

Definition at line 83 of file TerrainMaterial.h.

◆ m_staticThis

TerrainMaterial * TerrainMaterial::m_staticThis = NULL
staticprotected

Definition at line 74 of file TerrainMaterial.h.

◆ m_terrainSwatches

TerrainSwatches TerrainMaterial::m_terrainSwatches
protected

Definition at line 79 of file TerrainMaterial.h.

◆ m_terrainTreeView

CTreeCtrl TerrainMaterial::m_terrainTreeView
protected

Definition at line 78 of file TerrainMaterial.h.

◆ m_updating

Bool TerrainMaterial::m_updating
protected

Definition at line 75 of file TerrainMaterial.h.

◆ m_widthPopup

WBPopupSliderButton TerrainMaterial::m_widthPopup
protected

Definition at line 80 of file TerrainMaterial.h.


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