Cafu Engine
EditSurfacePropsDialogT Class Reference

The "Edit Surface Properties" dialog is the counterpart of the ToolEditSurfaceT tool. More...

#include "DialogEditSurfaceProps.hpp"

Inheritance diagram for EditSurfacePropsDialogT:

Public Member Functions

 EditSurfacePropsDialogT (wxWindow *Parent, MapDocumentT *MapDoc)
 The constructor. More...
 
 ~EditSurfacePropsDialogT ()
 The destructor. More...
 
void NotifySubjectDies (SubjectT *Subject)
 This method is called whenever a subject is about the be destroyed (and become unavailable). More...
 
bool Show (bool show=true)
 Overridden wxDialog::Show() function, because we also want to update the dialog on Show(true). More...
 
void ClearSelection ()
 Clears the list of faces and patches that were selected for surface-editing. More...
 
void ToggleClick (MapElementT *Object, unsigned long FaceIndex, bool IsRecursive=false)
 This method toggles the selection status of the given object. More...
 
void ApplyClick (ViewWindow3DT &ViewWin3D, MapElementT *Object, unsigned long FaceIndex)
 Called when the user right clicked on a face/patch in the 3D view to apply a material. More...
 
void EyeDropperClick (MapElementT *Object, unsigned long FaceIndex)
 Called when a material is picked by the eye dropper (left mouse button click in eyedropper mode). More...
 
bool WantSelectionOverlay () const
 Returns true if the hide selection overlay checkbox is unchecked and false if it is checked. More...
 
unsigned long GetNrOfSelectedFaces () const
 Returns the number of currently selected faces. More...
 
unsigned long GetNrOfSelectedPatches () const
 Returns the number of currently selected Bezier patches. More...
 
ArrayT< EditorMaterialI * > GetMRUMaterials () const
 Returns the current list of MRU materials (the first element is the selected material). More...
 
- Public Member Functions inherited from ObserverT
virtual void NotifySubjectChanged (SubjectT *Subject, MapDocOtherDetailT OtherDetail)
 Notifies the observer that some other detail than those specifically addressed below has changed. More...
 
virtual void NotifySubjectChanged_Selection (SubjectT *Subject, const ArrayT< MapElementT * > &OldSelection, const ArrayT< MapElementT * > &NewSelection)
 Notifies the observer that the selection in the current subject has been changed. More...
 
virtual void NotifySubjectChanged_Groups (SubjectT *Subject)
 Notifies the observer that the groups in the current subject have been changed (new group added, group deleted, visibility changed, anything). More...
 
virtual void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been created. More...
 
virtual void NotifySubjectChanged_Created (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been created. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< IntrusivePtrT< cf::GameSys::EntityT > > &Entities)
 Notifies the observer that one or more entities have been deleted. More...
 
virtual void NotifySubjectChanged_Deleted (SubjectT *Subject, const ArrayT< MapPrimitiveT * > &Primitives)
 Notifies the observer that one or more map primitives have been deleted. More...
 
virtual ~ObserverT ()
 The virtual destructor. More...
 
virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail)
 
virtual void NotifySubjectChanged_Modified (SubjectT *Subject, const ArrayT< MapElementT * > &MapElements, MapElemModDetailE Detail, const ArrayT< BoundingBox3fT > &OldBounds)
 
virtual void Notify_EntChanged (SubjectT *Subject, const ArrayT< IntrusivePtrT< MapEditor::CompMapEntityT > > &Entities, EntityModDetailE Detail)
 
virtual void Notify_VarChanged (SubjectT *Subject, const cf::TypeSys::VarBaseT &Var)
 Notifies the observer that a variable has changed. More...
 

Static Public Attributes

static const unsigned long ALL_FACES =0xFFFFFFFF
 

Additional Inherited Members

- Protected Member Functions inherited from ObserverT
 ObserverT ()
 The constructor. It is protected so that only derived classes can create instances of this class. More...
 

Detailed Description

The "Edit Surface Properties" dialog is the counterpart of the ToolEditSurfaceT tool.

Its state is comprised of two largely independent sub-states:

  • the set of selected faces and Bezier patches,
  • the surface information of the last picked face or Bezier patch, some of which is kept in explicit members, some as values of the dialog controls.

Constructor & Destructor Documentation

EditSurfacePropsDialogT::EditSurfacePropsDialogT ( wxWindow *  Parent,
MapDocumentT MapDoc 
)

The constructor.

EditSurfacePropsDialogT::~EditSurfacePropsDialogT ( )

The destructor.

Member Function Documentation

void EditSurfacePropsDialogT::ApplyClick ( ViewWindow3DT ViewWin3D,
MapElementT Object,
unsigned long  FaceIndex 
)

Called when the user right clicked on a face/patch in the 3D view to apply a material.

FaceIndex==ALL_FACES will perform the apply click on all faces of a brush (if Object is a brush).

void EditSurfacePropsDialogT::ClearSelection ( )

Clears the list of faces and patches that were selected for surface-editing.

void EditSurfacePropsDialogT::EyeDropperClick ( MapElementT Object,
unsigned long  FaceIndex 
)

Called when a material is picked by the eye dropper (left mouse button click in eyedropper mode).

ArrayT< EditorMaterialI * > EditSurfacePropsDialogT::GetMRUMaterials ( ) const

Returns the current list of MRU materials (the first element is the selected material).

unsigned long EditSurfacePropsDialogT::GetNrOfSelectedFaces ( ) const
inline

Returns the number of currently selected faces.

unsigned long EditSurfacePropsDialogT::GetNrOfSelectedPatches ( ) const
inline

Returns the number of currently selected Bezier patches.

void EditSurfacePropsDialogT::NotifySubjectDies ( SubjectT dyingSubject)
virtual

This method is called whenever a subject is about the be destroyed (and become unavailable).

Parameters
dyingSubjectThe subject that is being destroyed.

Implements ObserverT.

bool EditSurfacePropsDialogT::Show ( bool  show = true)

Overridden wxDialog::Show() function, because we also want to update the dialog on Show(true).

Note that this method is called indirectly by the wxAUI framework, when the related pane is shown or hidden!

void EditSurfacePropsDialogT::ToggleClick ( MapElementT Object,
unsigned long  FaceIndex,
bool  IsRecursive = false 
)

This method toggles the selection status of the given object.

It is called when the user left-clicked a face, Bezier patch or terrain in the 3D view.

Parameters
ObjectThe basic map object that is to be toggled.
FaceIndexIf Object is a brush, FaceIndex indicates which face of the brush is to be toggled, or ALL_FACES for all faces.
IsRecursiveUsed for implementation purposes only, user code should always pass the default value (false).
bool EditSurfacePropsDialogT::WantSelectionOverlay ( ) const
inline

Returns true if the hide selection overlay checkbox is unchecked and false if it is checked.


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