1 /*! 2 @file 3 @author Albert Semenov 4 @date 10/2008 5 */ 6 7 #ifndef _2122a0ba_a0a9_497c_8186_e1fa60400305_ 8 #define _2122a0ba_a0a9_497c_8186_e1fa60400305_ 9 10 #include <MyGUI.h> 11 #include "Dialog.h" 12 #include "ItemBox/BaseItemBox.h" 13 #include "TextureBrowseCell.h" 14 #include "Control.h" 15 16 namespace tools 17 { 18 19 ATTRIBUTE_CLASS_LAYOUT(TextureBrowseControl, "TextureBrowseControl.layout"); 20 class MYGUI_EXPORT_DLL TextureBrowseControl : 21 public Dialog, 22 public Control 23 { 24 public: 25 TextureBrowseControl(); 26 virtual ~TextureBrowseControl(); 27 28 const std::string& getTextureName() const; 29 void setTextureName(const std::string& _value); 30 31 void setTextures(const MyGUI::VectorString& _textures); 32 33 protected: 34 virtual void OnInitialise(Control* _parent, MyGUI::Widget* _place, const std::string& _layoutName); 35 36 virtual void onDoModal(); 37 virtual void onEndModal(); 38 39 private: 40 void notifyMouseButtonClickOk(MyGUI::Widget* _sender); 41 void notifyMouseButtonClickCancel(MyGUI::Widget* _sender); 42 void notifyWindowButtonPressed(MyGUI::Window* _sender, const std::string& _name); 43 void notifyChangeItemPosition(MyGUI::ItemBox* _sender, size_t _index); 44 void notifySelectItemAccept(MyGUI::ItemBox* _sender, size_t _index); 45 46 private: 47 ATTRIBUTE_FIELD_WIDGET_NAME(TextureBrowseControl, mOk, "OK"); 48 MyGUI::Button* mOk; 49 50 ATTRIBUTE_FIELD_WIDGET_NAME(TextureBrowseControl, mCancel, "Cancel"); 51 MyGUI::Button* mCancel; 52 53 wraps::BaseItemBox<TextureBrowseCell>* mTextures; 54 55 std::string mCurrentTextureName; 56 }; 57 58 } 59 60 #endif 61