LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::TextureEditor Class Reference

#include <texture_editor.h>

+ Inheritance diagram for lwpp::TextureEditor:
+ Collaboration diagram for lwpp::TextureEditor:

List of all members.

Public Member Functions

 TextureEditor ()
 TextureEditor (char *title, int flags, void *userData=0, LW_TxtrRemoveFunc *txtr_RemoveFunc=0, LW_TxtrAutoSizeFunc *txtr_AutoSizeFunc=0, LW_TxtrEventFunc *txtr_EventFunc=0)
 Constructor.
void close ()
 Closes the Texture editor window.
LWTLayerID currentLayer ()
 Returns the Texture Layer ID of the layer beign edited.
LWTECltID getID () const
 Returns the ID of the editor.
bool isOpen ()
 Returns TRUE if the Texture Editor Window is open.
void open (LWTextureID txtr_ID, char *title=0)
 Opens the panel for the Texture editor.
bool refresh ()
 Returns TRUE if the Texture Editor Window has been correctly refresh.
bool selectAdd (LWTextureID txtr_ID)
 Add a Texture to a multiselection. Returns true if there is no problems.
bool selectClr ()
 Clears the multiselection. Returns true if there is no problems.
LWTextureID selectFirst ()
 Selects the first texture, returning its Texture ID.
LWTextureID selectNext (LWTextureID txtr_ID)
 Selects the next texture, returning its Texture ID.
bool selectRem (LWTextureID txtr_ID)
 Removes a Texture from a multiselection. Returns true if there is no problems.
void setGradientAutoSize (LW_GradAutoSizeFunc *txtr_GradAutoSizeFunc)
 Designates a callback to perform autosizing.
void setPosition (int x, int y)
 Moves the Texture editor window.
LWTECltID subscribe (char *title, int flags, void *userData, LW_TxtrRemoveFunc *txtr_RemoveFunc=0, LW_TxtrAutoSizeFunc *txtr_AutoSizeFunc=0, LW_TxtrEventFunc *txtr_EventFunc=0)
 Returns the ID of the Texture Editor for later calls.
void unsubscribe (void)
 Frees the editor resources acquires with suscribe.

Protected Member Functions

bool _acquireGlobal ()
virtual bool available () const
 Check if the global is available.
virtual LWTxtrEdFuncs * getGlobal ()
 Get the pointer to the global.
LWTxtrEdFuncs * operator-> ()
 Get the pointer to the global.

Static Protected Attributes

static LWTxtrEdFuncs * globPtr
 Pointer to the global functions.

Detailed Description

Give access to the editing of textures with the Texture Editor


Constructor & Destructor Documentation

lwpp::TextureEditor::TextureEditor ( )
inline
lwpp::TextureEditor::TextureEditor ( char *  title,
int  flags,
void *  userData = 0,
LW_TxtrRemoveFunc *  txtr_RemoveFunc = 0,
LW_TxtrAutoSizeFunc *  txtr_AutoSizeFunc = 0,
LW_TxtrEventFunc *  txtr_EventFunc = 0 
)
inline

Constructor.

Parameters:
titleTitle of the Texture Editor
flagsIndicate what the user can do with the editor can be: TEF_USEBTN Add the Use Texture and Remove Texture buttons at the bottom of the panel. TEF_OPACITY Add layer opacity settings. TEF_BLEND Add blend options to the layer global settings. TEF_TYPE Add layer type control on the top of the pane. TEF_LAYERS Add layer list pane on the left side of the pane. TEF_ALL All of the above flags. This is the standard configuration for the texture editor.
userDataPointer to data created by the user, it can be NULL
txtr_RemoveFuncCallback to the function used when the user removes a texture. It is optional, and can be NULL.
txtr_AutoSizeFuncCallback to the function used when the user whants to autosize a texture. It is optional, and can be NULL.
txtr_EventFuncCallback to the function used modifiy the settings of a texture. It is optional, and can be NULL.

Member Function Documentation

bool lwpp::GlobalBase< LWTxtrEdFuncs >::_acquireGlobal ( )
inlineprotectedinherited
virtual bool lwpp::GlobalBase< LWTxtrEdFuncs >::available ( ) const
inlinevirtualinherited

Check if the global is available.

void lwpp::TextureEditor::close ( void  )
inline

Closes the Texture editor window.

LWTLayerID lwpp::TextureEditor::currentLayer ( )
inline

Returns the Texture Layer ID of the layer beign edited.

virtual LWTxtrEdFuncs * lwpp::GlobalBase< LWTxtrEdFuncs >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

LWTECltID lwpp::TextureEditor::getID ( void  ) const
inline

Returns the ID of the editor.

bool lwpp::TextureEditor::isOpen ( )
inline

Returns TRUE if the Texture Editor Window is open.

void lwpp::TextureEditor::open ( LWTextureID  txtr_ID,
char *  title = 0 
)
inline

Opens the panel for the Texture editor.

Parameters:
txtr_IDTexture ID to edit in the Texture Editor
titleTitle of the Texture Editor
LWTxtrEdFuncs * lwpp::GlobalBase< LWTxtrEdFuncs >::operator-> ( )
inlineinherited

Get the pointer to the global.

bool lwpp::TextureEditor::refresh ( )
inline

Returns TRUE if the Texture Editor Window has been correctly refresh.

bool lwpp::TextureEditor::selectAdd ( LWTextureID  txtr_ID)
inline

Add a Texture to a multiselection. Returns true if there is no problems.

Parameters:
txtr_IDLayer ID of the texture to add to the multiselection
bool lwpp::TextureEditor::selectClr ( )
inline

Clears the multiselection. Returns true if there is no problems.

LWTextureID lwpp::TextureEditor::selectFirst ( )
inline

Selects the first texture, returning its Texture ID.

LWTextureID lwpp::TextureEditor::selectNext ( LWTextureID  txtr_ID)
inline

Selects the next texture, returning its Texture ID.

Parameters:
txtr_IDTexture ID of the texture to select
bool lwpp::TextureEditor::selectRem ( LWTextureID  txtr_ID)
inline

Removes a Texture from a multiselection. Returns true if there is no problems.

Parameters:
txtr_IDLayer ID of the texture to remove from the multiselection
void lwpp::TextureEditor::setGradientAutoSize ( LW_GradAutoSizeFunc *  txtr_GradAutoSizeFunc)
inline

Designates a callback to perform autosizing.

Parameters:
*txtr_GradAutoSizeFuncFunction
void lwpp::TextureEditor::setPosition ( int  x,
int  y 
)
inline

Moves the Texture editor window.

Parameters:
xHorizontal coordinate in pixels of the Texture editor Window
yVertical coordinate in pixels of the Texture editor Window
LWTECltID lwpp::TextureEditor::subscribe ( char *  title,
int  flags,
void *  userData,
LW_TxtrRemoveFunc *  txtr_RemoveFunc = 0,
LW_TxtrAutoSizeFunc *  txtr_AutoSizeFunc = 0,
LW_TxtrEventFunc *  txtr_EventFunc = 0 
)
inline

Returns the ID of the Texture Editor for later calls.

Parameters:
titleTitle of the Texture Editor
flagsIndicate what the user can do with the editor can be: TEF_USEBTN Add the Use Texture and Remove Texture buttons at the bottom of the panel. TEF_OPACITY Add layer opacity settings. TEF_BLEND Add blend options to the layer global settings. TEF_TYPE Add layer type control on the top of the pane. TEF_LAYERS Add layer list pane on the left side of the pane. TEF_ALL All of the above flags. This is the standard configuration for the texture editor.
userDataPointer to data created by the user, it can be NULL
txtr_RemoveFuncCallback to the function used when the user removes a texture. It is optional, and can be NULL.
txtr_AutoSizeFuncCallback to the function used when the user whants to autosize a texture. It is optional, and can be NULL.
txtr_EventFuncCallback to the function used modifiy the settings of a texture. It is optional, and can be NULL.
void lwpp::TextureEditor::unsubscribe ( void  )
inline

Frees the editor resources acquires with suscribe.

this will clear the ID, so you will to call suscribe again to be able to use the Texture Editor Functions


Member Data Documentation

LWTxtrEdFuncs * lwpp::GlobalBase< LWTxtrEdFuncs >::globPtr
staticprotectedinherited

Pointer to the global functions.


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