~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Tools/EditorFramework/ScopeTextureControl.h

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
        @file
 
3
        @author         Albert Semenov
 
4
        @date           08/2010
 
5
*/
 
6
 
 
7
#ifndef _31513eda_9f1b_4986_a5a5_466942db581b_
 
8
#define _31513eda_9f1b_4986_a5a5_466942db581b_
 
9
 
 
10
#include "TextureToolControl.h"
 
11
#include "Property.h"
 
12
 
 
13
namespace tools
 
14
{
 
15
 
 
16
        class MYGUI_EXPORT_DLL ScopeTextureControl :
 
17
                public TextureToolControl
 
18
        {
 
19
        public:
 
20
                ScopeTextureControl();
 
21
                virtual ~ScopeTextureControl();
 
22
 
 
23
                enum SelectorType { SelectorNone, SelectorCoord, SelectorPosition, SelectorPositionReadOnly, SelectorOffsetH, SelectorOffsetV };
 
24
 
 
25
                void setCoordValue(const MyGUI::IntCoord& _value, SelectorType _type);
 
26
                void clearCoordValue();
 
27
 
 
28
                typedef std::pair<MyGUI::IntCoord, SelectorType> PairCoordType;
 
29
                typedef std::vector<PairCoordType> VectorCoord;
 
30
                void setViewSelectors(const VectorCoord& _selectors);
 
31
                void clearViewSelectors();
 
32
 
 
33
                void clearAll();
 
34
 
 
35
                sigslot::signal1<const std::string&> eventChangeValue;
 
36
 
 
37
        protected:
 
38
                virtual void OnInitialise(Control* _parent, MyGUI::Widget* _place, const std::string& _layoutName);
 
39
 
 
40
                virtual void onMouseButtonClick(const MyGUI::IntPoint& _point);
 
41
 
 
42
                virtual void onChangeScale();
 
43
 
 
44
        private:
 
45
                void notifyChangeSelection();
 
46
                void notifyComboChangePosition(MyGUI::ComboBox* _sender, size_t _index);
 
47
                void notifyChangePosition(SelectorControl* _sender);
 
48
 
 
49
                void updateFromCoordValue();
 
50
 
 
51
                void CommandMoveLeft(const MyGUI::UString& _commandName, bool& _result);
 
52
                void CommandMoveRight(const MyGUI::UString& _commandName, bool& _result);
 
53
                void CommandMoveTop(const MyGUI::UString& _commandName, bool& _result);
 
54
                void CommandMoveBottom(const MyGUI::UString& _commandName, bool& _result);
 
55
                void CommandGridMoveLeft(const MyGUI::UString& _commandName, bool& _result);
 
56
                void CommandGridMoveRight(const MyGUI::UString& _commandName, bool& _result);
 
57
                void CommandGridMoveTop(const MyGUI::UString& _commandName, bool& _result);
 
58
                void CommandGridMoveBottom(const MyGUI::UString& _commandName, bool& _result);
 
59
 
 
60
                void CommandSizeLeft(const MyGUI::UString& _commandName, bool& _result);
 
61
                void CommandSizeRight(const MyGUI::UString& _commandName, bool& _result);
 
62
                void CommandSizeTop(const MyGUI::UString& _commandName, bool& _result);
 
63
                void CommandSizeBottom(const MyGUI::UString& _commandName, bool& _result);
 
64
                void CommandGridSizeLeft(const MyGUI::UString& _commandName, bool& _result);
 
65
                void CommandGridSizeRight(const MyGUI::UString& _commandName, bool& _result);
 
66
                void CommandGridSizeTop(const MyGUI::UString& _commandName, bool& _result);
 
67
                void CommandGridSizeBottom(const MyGUI::UString& _commandName, bool& _result);
 
68
 
 
69
                void updateCaption();
 
70
 
 
71
                void setValue(const std::string& _value);
 
72
 
 
73
                typedef std::pair<SelectorControl*, SelectorType> PairSelectorType;
 
74
                typedef std::vector<PairSelectorType> VectorSelector;
 
75
                SelectorControl* getFreeSelector(VectorSelector& _selectors, bool _backType, SelectorType _type, bool& _changes);
 
76
 
 
77
        private:
 
78
                SelectorControl* mCurrentSelectorControl;
 
79
                SelectorType mCurrentSelectorType;
 
80
 
 
81
                MyGUI::IntCoord mCoordValue;
 
82
 
 
83
                VectorSelector mBlackSelectors;
 
84
                VectorSelector mSelectors;
 
85
        };
 
86
 
 
87
}
 
88
 
 
89
#endif