MeshTex  3.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
SetScaleDialog Class Reference

Subclass of GenericDialog that implements the window summoned by selecting the Set S/T Scale menu entry. More...

#include <SetScaleDialog.h>

Inheritance diagram for SetScaleDialog:
GenericDialog RefCounted

List of all members.

Classes

class  SetScaleVisitor
 Visitor for applying the chosen scaling to a mesh. More...

Public Member Functions

 SetScaleDialog (const std::string &key)
 Constructor.
 ~SetScaleDialog ()
 Destructor.
bool Apply ()
 Handler for the Apply logic for this dialog.
void PopulateSWidgets (float scale, float tiles)
 Allow an external caller to set some of the S-axis entries.
void PopulateTWidgets (float scale, float tiles)
 Allow an external caller to set some of the T-axis entries.
- Public Member Functions inherited from GenericDialog
const std::string & GetKey () const
 Get the unique key that identifies this dialog widget.
virtual void SetWindow (GtkWidget *window)
 Mark this window widget as a modal dialog for a parent window.
virtual void Raise ()
 Raise this dialog window to the top of the window stack.
virtual void Show (const std::string &triggerCommand)
 Make this dialog window visible and foreground.
virtual void Hide ()
 Hide this dialog window.
virtual gint CloseEventCallback (GtkWidget *widget, GdkEvent *event, gpointer callbackID)
 Callback for window-close event.
virtual void FinalizeCallback (GtkWidget *widget, gpointer callbackID)
 Callback for clicking on OK/Apply/Cancel button.
void CreateWindowCloseCallback ()
 Register the callback for the close-window event.
void CreateOkButtonCallback (GtkWidget *button)
 Register the callback for the OK button.
void CreateApplyButtonCallback (GtkWidget *button)
 Register the callback for the Apply button.
void CreateCancelButtonCallback (GtkWidget *button)
 Register the callback for the Cancel button.
- Public Member Functions inherited from RefCounted
 RefCounted ()
 Default constructor.
virtual ~RefCounted ()
 Virtual destructor.
void IncRef ()
 Increment reference count.
void DecRef ()
 Decrement reference count, and self-delete if count is <= 0.

Private Member Functions

void PopulateEntry (const char *widgetName, float value)
 Populate a text widget with a floating point number.

Private Attributes

SmartPointer< MeshVisitor_nullVisitor
 Action-less mesh visitor used purely to count the number of selected mesh entities.

Additional Inherited Members

- Protected Member Functions inherited from GenericDialog
 GenericDialog (const std::string &key)
 Constructor.
virtual ~GenericDialog ()
 Virtual destructor.
- Protected Attributes inherited from GenericDialog
GtkWidget * _dialog
 This dialog widget.
GtkWidget * _window
 Parent window.
const std::string _key
 Unique key for this dialog.
std::string _triggerCommand
 Command token that most recently summoned this dialog.
gpointer _okCallbackID
 Callback ID associated with an OK button; 0 if none.
gpointer _applyCallbackID
 Callback ID associated with an Apply button; 0 if none.
gpointer _cancelCallbackID
 Callback ID associated with a Cancel button; 0 if none.

Detailed Description

Subclass of GenericDialog that implements the window summoned by selecting the Set S/T Scale menu entry.

This window is used to control the scaling of the S and/or T texture axes.

setscale.png

Constructor & Destructor Documentation

SetScaleDialog::SetScaleDialog ( const std::string &  key)

Constructor.

Configure the dialog window and create all the contained widgets. Connect widgets to callbacks as necessary.

Parameters:
keyThe unique key identifying this dialog.

Member Function Documentation

bool SetScaleDialog::Apply ( )
virtual

Handler for the Apply logic for this dialog.

Apply the specified scaling to the selected mesh entities.

Returns:
true if any meshes are selected, false otherwise.

Reimplemented from GenericDialog.

void SetScaleDialog::PopulateEntry ( const char *  widgetName,
float  value 
)
private

Populate a text widget with a floating point number.

Parameters:
widgetNameName of the widget.
valueThe number to write to the widget.
void SetScaleDialog::PopulateSWidgets ( float  scale,
float  tiles 
)

Allow an external caller to set some of the S-axis entries.

Parameters:
scaleTexture scaling.
tilesTexture tiles.
void SetScaleDialog::PopulateTWidgets ( float  scale,
float  tiles 
)

Allow an external caller to set some of the T-axis entries.

Parameters:
scaleTexture scaling.
tilesTexture tiles.

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