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

FeatherOptions modeless (floating) dialog - allows entry and display of brush width and feather. More...

#include <FeatherOptions.h>

Inherits COptionsPanel, and PopupSliderOwner.

Public Types

enum  {
  MIN_FEATHER_SIZE =2 , MAX_FEATHER_SIZE =51 , MIN_RATE =1 , MAX_RATE =10 ,
  MIN_RADIUS =1 , MAX_RADIUS =5
}
 
enum  { IDD = IDD_FEATHER_OPTIONS }
 
- Public Types inherited from COptionsPanel
enum  { IDD = IDD_NO_OPTIONS }
 

Public Member Functions

 FeatherOptions (CWnd *pParent=NULL)
 FeatherOptions dialog trivial construstor - Create does the real work.
 
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 void setFeather (Int feather)
 Sets the feather value in the dialog.
 
static void setRate (Int rate)
 Sets the rate value in the dialog.
 
static void setRadius (Int radius)
 Sets the radius value in the dialog.
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 Windows default stuff.
 
virtual void OnOK ()
 
virtual void OnCancel ()
 Modeless dialogs don't OK, so eat this for modeless.
 
virtual BOOL OnInitDialog ()
 Modeless dialogs don't close on ESC, so eat this for modeless.
 
afx_msg void OnChangeSizeEdit ()
 Handles width edit ui messages.
 
- 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
 true if the ui is updating itself.
 
WBPopupSliderButton m_featherPopup
 
WBPopupSliderButton m_radiusPopup
 
WBPopupSliderButton m_ratePopup
 

Static Protected Attributes

static FeatherOptionsm_staticThis = NULL
 Reference to the floating panel so SetWidth and SetFeather can be static.
 
static Int m_currentFeather = 0
 current brush width in the ui.
 
static Int m_currentRadius = 1
 current smoothing radius value.
 
static Int m_currentRate = 3
 current smoothing rate.
 

Detailed Description

FeatherOptions modeless (floating) dialog - allows entry and display of brush width and feather.

Definition at line 33 of file FeatherOptions.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 48 of file FeatherOptions.h.

◆ anonymous enum

anonymous enum
Enumerator
MIN_FEATHER_SIZE 
MAX_FEATHER_SIZE 
MIN_RATE 
MAX_RATE 
MIN_RADIUS 
MAX_RADIUS 

Definition at line 37 of file FeatherOptions.h.

Constructor & Destructor Documentation

◆ FeatherOptions()

FeatherOptions::FeatherOptions ( CWnd * pParent = NULL)

FeatherOptions dialog trivial construstor - Create does the real work.

Definition at line 37 of file FeatherOptions.cpp.

Member Function Documentation

◆ DoDataExchange()

void FeatherOptions::DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Windows default stuff.

Reimplemented from COptionsPanel.

Definition at line 45 of file FeatherOptions.cpp.

◆ GetPopSliderInfo()

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

Implements PopupSliderOwner.

Definition at line 146 of file FeatherOptions.cpp.

◆ OnCancel()

virtual void FeatherOptions::OnCancel ( )
inlineprotectedvirtual

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

Definition at line 59 of file FeatherOptions.h.

◆ OnChangeSizeEdit()

void FeatherOptions::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 125 of file FeatherOptions.cpp.

◆ OnInitDialog()

BOOL FeatherOptions::OnInitDialog ( )
protectedvirtual

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

Dialog UI initialization.

Creates the slider controls, and sets the initial values for width and feather in the ui controls.

Definition at line 102 of file FeatherOptions.cpp.

◆ OnOK()

virtual void FeatherOptions::OnOK ( )
inlineprotectedvirtual

Definition at line 58 of file FeatherOptions.h.

◆ PopSliderChanged()

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

Implements PopupSliderOwner.

Definition at line 178 of file FeatherOptions.cpp.

◆ PopSliderFinished()

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

Implements PopupSliderOwner.

Definition at line 213 of file FeatherOptions.cpp.

◆ setFeather()

void FeatherOptions::setFeather ( Int feather)
static

Sets the feather value in the dialog.

Update the value in the edit control and the slider.

Definition at line 55 of file FeatherOptions.cpp.

◆ setRadius()

void FeatherOptions::setRadius ( Int radius)
static

Sets the radius value in the dialog.

Update the value in the edit control and the slider.

Definition at line 83 of file FeatherOptions.cpp.

◆ setRate()

void FeatherOptions::setRate ( Int rate)
static

Sets the rate value in the dialog.

Update the value in the edit control and the slider.

Definition at line 69 of file FeatherOptions.cpp.

Member Data Documentation

◆ m_currentFeather

Int FeatherOptions::m_currentFeather = 0
staticprotected

current brush width in the ui.

Definition at line 74 of file FeatherOptions.h.

◆ m_currentRadius

Int FeatherOptions::m_currentRadius = 1
staticprotected

current smoothing radius value.

Definition at line 75 of file FeatherOptions.h.

◆ m_currentRate

Int FeatherOptions::m_currentRate = 3
staticprotected

current smoothing rate.

Definition at line 76 of file FeatherOptions.h.

◆ m_featherPopup

WBPopupSliderButton FeatherOptions::m_featherPopup
protected

Definition at line 79 of file FeatherOptions.h.

◆ m_radiusPopup

WBPopupSliderButton FeatherOptions::m_radiusPopup
protected

Definition at line 80 of file FeatherOptions.h.

◆ m_ratePopup

WBPopupSliderButton FeatherOptions::m_ratePopup
protected

Definition at line 81 of file FeatherOptions.h.

◆ m_staticThis

FeatherOptions * FeatherOptions::m_staticThis = NULL
staticprotected

Reference to the floating panel so SetWidth and SetFeather can be static.

Definition at line 73 of file FeatherOptions.h.

◆ m_updating

Bool FeatherOptions::m_updating
protected

true if the ui is updating itself.

Definition at line 78 of file FeatherOptions.h.


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