Cafu Engine
ToolEditSurface.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_TOOL_EDIT_SURFACE_HPP_INCLUDED
8 #define CAFU_TOOL_EDIT_SURFACE_HPP_INCLUDED
9 
10 #include "Tool.hpp"
11 
12 
13 class MapDocumentT;
15 
16 
17 class ToolEditSurfaceT : public ToolT
18 {
19  public:
20 
21  ToolEditSurfaceT(MapDocumentT& MapDoc, ToolManagerT& ToolMan, wxWindow* ParentOptionsBar);
22 
23  // Implementations/overrides of ToolT methods.
24  int GetWxEventID() const { return ChildFrameT::ID_MENU_TOOLS_TOOL_EDITSURFACEPROPERTIES; }
25  wxWindow* GetOptionsBar();
26  void OnActivate(ToolT* OldTool);
27  void OnDeactivate(ToolT* NewTool);
28 
29  bool OnLMouseDown2D (ViewWindow2DT& ViewWindow, wxMouseEvent& ME);
30  bool OnKeyDown2D (ViewWindow2DT& ViewWindow, wxKeyEvent& KE);
31  bool OnKeyUp2D (ViewWindow2DT& ViewWindow, wxKeyEvent& KE);
32 
33  bool OnKeyDown3D (ViewWindow3DT& ViewWindow, wxKeyEvent& KE);
34  bool OnKeyUp3D (ViewWindow3DT& ViewWindow, wxKeyEvent& KE);
35  bool OnLMouseDown3D (ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
36  bool OnRMouseClick3D(ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
37  bool OnMouseMove3D (ViewWindow3DT& ViewWindow, wxMouseEvent& ME);
38 
39  bool UpdateStatusBar(ChildFrameT* ChildFrame) const;
40 
41  // The TypeSys related declarations for this class.
42  virtual const cf::TypeSys::TypeInfoT* GetType() const { return &TypeInfo; }
43  static void* CreateInstance(const cf::TypeSys::CreateParamsT& Params);
44  static const cf::TypeSys::TypeInfoT TypeInfo;
45 
46 
47  private:
48 
49  bool m_EyeDropperActive;
50 
51  OptionsBar_EditFacePropsToolT* m_OptionsBar; ///< The options bar for this tool.
52 };
53 
54 #endif
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
Definition: ToolEditSurface.hpp:17
wxWindow * GetOptionsBar()
Returns the options bar window associated with this tool. NULL if no options bar has been assigned...
Definition: ToolEditSurface.cpp:48
This class represents a child frame.
Definition: ChildFrame.hpp:55
bool OnLMouseDown2D(ViewWindow2DT &ViewWindow, wxMouseEvent &ME)
Also used for LMB "double-click" events (use ME.ButtonDClick() for distinction).
Definition: ToolEditSurface.cpp:92
int GetWxEventID() const
Returns the ID of the wxWidgets event (menu selection or toolbar button click) that is associated wit...
Definition: ToolEditSurface.hpp:24
bool OnRMouseClick3D(ViewWindow3DT &ViewWindow, wxMouseEvent &ME)
For the RMB, only a "click" event is available, because the RMB is also used for mouse-looking and th...
Definition: ToolEditSurface.cpp:204
The options bar for the Edit Face Properties tool.
Definition: ToolOptionsBars.hpp:195
bool OnLMouseDown3D(ViewWindow3DT &ViewWindow, wxMouseEvent &ME)
Also used for LMB "double-click" events (use ME.ButtonDClick() for distinction).
Definition: ToolEditSurface.cpp:174
Definition: ChildFrameViewWin2D.hpp:24
Definition: ChildFrameViewWin3D.hpp:21
Definition: ToolManager.hpp:20
This is the base class for all tools in the map editor.
Definition: Tool.hpp:34
Definition: TypeSys.hpp:52
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79