ASPiK SDK
iaction.h
1 // This file is part of VSTGUI. It is subject to the license terms
2 // in the LICENSE file found in the top-level directory of this
3 // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE
4 
5 #ifndef __iaction__
6 #define __iaction__
7 
8 #include "../../lib/vstguifwd.h"
9 
10 #if VSTGUI_LIVE_EDITING
11 #include "../../lib/cfont.h"
12 
13 namespace VSTGUI {
14 class UIAttributes;
15 
16 //----------------------------------------------------------------------------------------------------
17 class IAction
18 {
19 public:
20  virtual ~IAction () {}
21 
22  virtual UTF8StringPtr getName () = 0;
23  virtual void perform () = 0;
24  virtual void undo () = 0;
25 };
26 
27 //----------------------------------------------------------------------------------------------------
28 class IActionPerformer
29 {
30 public:
31  virtual ~IActionPerformer () {}
32  virtual void performAction (IAction* action) = 0;
33 
34  virtual void performColorChange (UTF8StringPtr colorName, const CColor& newColor, bool remove = false) = 0;
35  virtual void performTagChange (UTF8StringPtr tagName, UTF8StringPtr tagString, bool remove = false) = 0;
36  virtual void performBitmapChange (UTF8StringPtr bitmapName, UTF8StringPtr bitmapPath, bool remove = false) = 0;
37  virtual void performGradientChange (UTF8StringPtr gradientName, CGradient* newGradient, bool remove = false) = 0;
38  virtual void performFontChange (UTF8StringPtr fontName, CFontRef newFont, bool remove = false) = 0;
39 
40  virtual void performColorNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
41  virtual void performTagNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
42  virtual void performFontNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
43  virtual void performBitmapNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
44  virtual void performGradientNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
45 
46  virtual void performAlternativeFontChange (UTF8StringPtr fontName, UTF8StringPtr newAlternativeFonts) = 0;
47 
48  virtual void performBitmapNinePartTiledChange (UTF8StringPtr bitmapName, const CRect* offsets) = 0;
49  virtual void performBitmapFiltersChange (UTF8StringPtr bitmapName, const std::list<SharedPointer<UIAttributes> >& filterDescription) = 0;
50 
51  virtual void beginLiveColorChange (UTF8StringPtr colorName) = 0;
52  virtual void performLiveColorChange (UTF8StringPtr colorName, const CColor& newColor) = 0;
53  virtual void endLiveColorChange (UTF8StringPtr colorName) = 0;
54 
55  virtual void performTemplateNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
56  virtual void performCreateNewTemplate (UTF8StringPtr name, UTF8StringPtr baseViewClassName) = 0;
57  virtual void performDeleteTemplate (UTF8StringPtr name) = 0;
58  virtual void performDuplicateTemplate (UTF8StringPtr name, UTF8StringPtr dupName) = 0;
59  virtual void onTemplateCreation (UTF8StringPtr name, CView* view) = 0;
60  virtual void onTemplateNameChange (UTF8StringPtr oldName, UTF8StringPtr newName) = 0;
61 
62  virtual void beginGroupAction (UTF8StringPtr name) = 0;
63  virtual void finishGroupAction () = 0;
64 };
65 
66 } // namespace
67 
68 #endif // VSTGUI_LIVE_EDITING
69 
70 #endif // __iaction__
void perform(Context context, Task &&task)
Definition: macasync.mm:29
Definition: customcontrols.cpp:8