LightWrap++
AC++wrapperfortheLightWave3DSDK
texture_editor.h
Go to the documentation of this file.
1 
7 #ifndef LWPP_TXTEDITOR_H
8 #define LWPP_TXTEDITOR_H
9 
10 
11 #include <lwpp/global.h>
12 #include <lwtxtred.h>
13 
14 namespace lwpp
15 {
16 
18 
21  class TextureEditor : protected GlobalBase<LWTxtrEdFuncs>
22  {
23  private:
24  LWTECltID txtrEditorID;
25  public:
26  public:
28  : txtrEditorID(0)
29  {
30  ;
31  }
33 
47  TextureEditor (char *title,
48  int flags,
49  void *userData = 0,
50  LW_TxtrRemoveFunc *txtr_RemoveFunc = 0,
51  LW_TxtrAutoSizeFunc *txtr_AutoSizeFunc = 0,
52  LW_TxtrEventFunc *txtr_EventFunc = 0)
53  {
54  txtrEditorID = subscribe( title, flags, userData, txtr_RemoveFunc , txtr_AutoSizeFunc, txtr_EventFunc);
55  }
56 
58  LWTECltID getID() const { return txtrEditorID; }
59 
61 
75  LWTECltID subscribe (char *title,
76  int flags,
77  void *userData,
78  LW_TxtrRemoveFunc *txtr_RemoveFunc = 0,
79  LW_TxtrAutoSizeFunc *txtr_AutoSizeFunc = 0,
80  LW_TxtrEventFunc *txtr_EventFunc = 0)
81  {
82  return globPtr->subscribe( title, flags, userData, txtr_RemoveFunc, txtr_AutoSizeFunc, txtr_EventFunc);
83  }
85 
89  void unsubscribe( void ) { globPtr->unsubscribe(txtrEditorID); }
91 
95  void open ( LWTextureID txtr_ID, char *title = 0) { globPtr->open(txtrEditorID, txtr_ID, title ); }
97 
101  void setPosition (int x, int y) { globPtr->setPosition(txtrEditorID, x, y); }
102 
104  void close () { globPtr->close(txtrEditorID); }
105 
107  bool isOpen ( ) { return (globPtr->isOpen(txtrEditorID))? true : false; }
108 
110  bool refresh () { return (globPtr->refresh(txtrEditorID)) ? true : false; }
111 
113  LWTLayerID currentLayer ( ) { return globPtr->currentLayer(txtrEditorID); }
114 
116 
119  bool selectAdd ( LWTextureID txtr_ID) { return (globPtr->selectAdd(txtrEditorID, txtr_ID)) ? true : false; }
120 
122 
125  bool selectRem ( LWTextureID txtr_ID) { return (globPtr->selectRem(txtrEditorID, txtr_ID)) ? true : false; }
126 
128  bool selectClr ( ) { return (globPtr->selectClr(txtrEditorID)) ? true : false; }
129 
131  LWTextureID selectFirst ( ) { return globPtr->selectFirst(txtrEditorID); }
132 
134 
137  LWTextureID selectNext ( LWTextureID txtr_ID){ return globPtr->selectNext(txtrEditorID, txtr_ID); }
139 
142  void setGradientAutoSize ( LW_GradAutoSizeFunc *txtr_GradAutoSizeFunc) { globPtr->setGradientAutoSize(txtrEditorID, txtr_GradAutoSizeFunc); }
143 
144  }; // end class TextureEditor
145 
146 } // end namespace
147 #endif // LWPP_TXTEDITOR_H