1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
#ifndef _ccbbea0f_9b0d_4e19_9404_4b91b70a6477_
#define _ccbbea0f_9b0d_4e19_9404_4b91b70a6477_
#include "TextureToolControl.h"
#include "PropertiesPanelView.h"
#include "WidgetsWindow.h"
#include "AreaSelectorControl.h"
#include "PositionSelectorControl.h"
namespace tools
{
class WorkspaceControl :
public TextureToolControlLE
{
public:
WorkspaceControl(MyGUI::Widget* _parent = nullptr);
~WorkspaceControl() override;
protected:
void onMouseMove() override;
void onMouseButtonPressed(const MyGUI::IntPoint& _point) override;
void onMouseButtonReleased(const MyGUI::IntPoint& _point) override;
void onMouseButtonClick(const MyGUI::IntPoint& _point) override;
void onMouseDrag(const MyGUI::IntPoint& _point) override;
void onChangeScale() override;
private:
void notifyChangePosition();
void notifyChangeSelectedWidget(MyGUI::Widget* _currentWidget);
void notifyPropertyChangeCoord(MyGUI::Widget* _widget, const MyGUI::IntCoord& _coordValue, const std::string& _owner);
void notifyChangeCreatorMode(bool _createMode);
void notifyChangeSelectorCreator(bool _visible, const MyGUI::IntCoord& _coord);
void notifyFrameStart(float _time);
void updateFromCoordValue();
void updateSelectionFromValue();
void updateSelectorEnabled();
void updateCaption();
void updateMenu();
void Command_MoveLeft(const MyGUI::UString& _commandName, bool& _result);
void Command_MoveRight(const MyGUI::UString& _commandName, bool& _result);
void Command_MoveTop(const MyGUI::UString& _commandName, bool& _result);
void Command_MoveBottom(const MyGUI::UString& _commandName, bool& _result);
void Command_GridMoveLeft(const MyGUI::UString& _commandName, bool& _result);
void Command_GridMoveRight(const MyGUI::UString& _commandName, bool& _result);
void Command_GridMoveTop(const MyGUI::UString& _commandName, bool& _result);
void Command_GridMoveBottom(const MyGUI::UString& _commandName, bool& _result);
void Command_SizeLeft(const MyGUI::UString& _commandName, bool& _result);
void Command_SizeRight(const MyGUI::UString& _commandName, bool& _result);
void Command_SizeTop(const MyGUI::UString& _commandName, bool& _result);
void Command_SizeBottom(const MyGUI::UString& _commandName, bool& _result);
void Command_GridSizeLeft(const MyGUI::UString& _commandName, bool& _result);
void Command_GridSizeRight(const MyGUI::UString& _commandName, bool& _result);
void Command_GridSizeTop(const MyGUI::UString& _commandName, bool& _result);
void Command_GridSizeBottom(const MyGUI::UString& _commandName, bool& _result);
void Command_Delete(const MyGUI::UString& _commandName, bool& _result);
void Command_NextItem(const MyGUI::UString& _commandName, bool& _result);
void Command_FreeChildMode(const MyGUI::UString& _commandName, bool& _result);
void setWidgetCoord(MyGUI::Widget* _widget, const MyGUI::IntCoord& _coord);
void setRttLayerSize(const MyGUI::IntSize& _size);
private:
AreaSelectorControlLE* mAreaSelectorControl;
MyGUI::IntCoord mCoordValue;
MyGUI::Widget* mCurrentWidget;
bool mMoveableWidget;
PositionSelectorControlLE* mPositionSelectorCreatorControl;
bool mFreeChildMode;
};
}
#endif
|