root/cafu/trunk/CaWE/ChildFrameViewWin.hpp

Revision 457, 3.2 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22#ifndef CAFU_CHILDFRAME_VIEW_WIN_HPP_INCLUDED
23#define CAFU_CHILDFRAME_VIEW_WIN_HPP_INCLUDED
24
25#include "ObserverPattern.hpp"
26#include "ObserverPatternTools.hpp"
27
28
29class AxesInfoT;
30class ChildFrameT;
31class MapDocumentT;
32class wxWindow;
33
34
35/// This class represents a (superclass of a) 2D or 3D map view window.
36class ViewWindowT : public ObserverT, public ToolsObserverT
37{
38    public:
39
40    enum ViewTypeT
41    {
42        VT_2D_XY,           // Top
43        VT_2D_XZ,           // Front
44        VT_2D_YZ,           // Side
45        VT_3D_WIREFRAME,
46        VT_3D_FLAT,
47        VT_3D_EDIT_MATS,    // Materials in Edit    mode (shows the meta_EditorImage texture).
48        VT_3D_FULL_MATS,    // Materials in Preview mode (shows the real material).
49        VT_3D_LM_GRID,
50        VT_3D_LM_PREVIEW
51    };
52
53
54    // Methods inherited from ObserverT.
55 // void NotifySubjectChanged(...);     // Implemented by derived classes.
56    void NotifySubjectDies(SubjectT* dyingSubject);
57
58    virtual wxWindow* GetWindow()=0;            ///< This function is not const because we can mutate this(!) object via the returned pointer.
59    virtual ViewTypeT GetViewType() const=0;    ///< Returns the view type of this view window.
60    virtual AxesInfoT GetAxesInfo() const=0;    ///< This method returns the axes info for this window. In the case of a 3D window, it computes the 2D axes info that this view is closest to.
61    wxString          GetCaption() const;       ///< Returns the caption that the AUI pane for this window should have.
62    ChildFrameT*      GetChildFrame() const;    ///< Returns the child frame that owns this view (that is, our parent).
63    MapDocumentT&     GetMapDoc() const;        ///< The document that is associated with this view window (or more precisely, our child frame).
64
65
66    protected:
67
68    /// The constructor. It is protected because only child classes should ever be instantiated.
69    ViewWindowT(ChildFrameT* ChildFrame);
70
71    /// The destructor. Virtual such that also the child destructors will be called.
72    virtual ~ViewWindowT();
73
74    void UpdateChildFrameMRU();
75
76    ChildFrameT* m_ChildFrame;      ///< The child frame that owns us (that is, is our parent).
77};
78
79#endif
Note: See TracBrowser for help on using the browser.