Mercurial > fife-parpg
annotate engine/core/gui/guimanager.h @ 697:ecaa4d98f05f tip
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
* Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring.
* GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass.
* The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class.
* The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged.
* Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author | M. George Hansen <technopolitica@gmail.com> |
---|---|
date | Sat, 18 Jun 2011 00:28:40 -1000 |
parents | 5d6b1820b953 |
children |
rev | line source |
---|---|
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
1 /*************************************************************************** |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
2 * Copyright (C) 2005-2008 by the FIFE team * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
3 * http://www.fifengine.de * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
4 * This file is part of FIFE. * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
5 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
6 * FIFE is free software; you can redistribute it and/or * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
8 * License as published by the Free Software Foundation; either * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
10 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
14 * Lesser General Public License for more details. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
15 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
17 * License along with this library; if not, write to the * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
18 * Free Software Foundation, Inc., * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
20 ***************************************************************************/ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
21 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
22 #ifndef FIFE_GUI_GUIMANAGER_H |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
23 #define FIFE_GUI_GUIMANAGER_H |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
25 // Standard C++ library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
26 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
27 // 3rd party library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
28 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
29 // FIFE includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
30 // These includes are split up in two parts, separated by one empty line |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
31 // First block: files included from the FIFE root src directory |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
32 // Second block: files included from the same folder |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
33 #include "util/base/singleton.h" |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
34 #include "eventchannel/sdl/ec_isdleventlistener.h" |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
35 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
36 namespace FIFE { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
37 class ImagePool; |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
38 class RenderBackend; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
39 class GuiImageLoader; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
40 class Console; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 class GuiFont; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
42 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
43 class GuiManager: |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
44 public ISdlEventListener { |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
45 public: |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
46 /** Constructor. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
47 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
48 GuiManager(ImagePool& pool); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
49 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
50 /** Destructor. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
51 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
52 virtual ~GuiManager(); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
53 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
54 /** Performs the GUI logic and draws the GUI accordingly. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
55 * |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
56 * This will be called each frame. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
57 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
58 virtual void turn() = 0; |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
59 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
60 /** Inits the GUI Manager. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
61 * @param graphics backend specific graphics object to use |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
62 * @param screenWidth width for the gui top container |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
63 * @param screenHeight height for the gui top container |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
64 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
65 virtual void init(RenderBackend* render_backend, int screenWidth, |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
66 int screenHeight); |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
67 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
68 /** Resizes the top container. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
69 * |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
70 * @param x The new starting X coordinate. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
71 * @param y The new starting Y coordinate. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
72 * @param width The new width. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
73 * @param height The new height. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
74 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
75 virtual void resize(unsigned int x, unsigned int y, unsigned int width, |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
76 unsigned int height) = 0; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
77 |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
78 /** Gets the console. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
79 * |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
80 * @return The console. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
81 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
82 Console* getConsole() const { |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
83 return m_console; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
84 } |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
85 |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
86 /** Display the in-game FIFE console. */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
87 virtual void showConsole() = 0; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
88 |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
89 /** Hide the in-game FIFE console. */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
90 virtual void hideConsole() = 0; |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
91 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
92 /** Toggle the visibility of the in-game FIFE console. */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
93 virtual void toggleConsole(); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
94 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
95 /** Gets the shared ImagePool instance. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
96 * |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
97 * @return The ImagePool instance. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
98 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
99 ImagePool& getImagePool() const { |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
100 return m_image_pool; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
101 } |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
102 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
103 virtual bool onSdlEvent(SDL_Event& evt) = 0; |
654
5d6b1820b953
* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
378
diff
changeset
|
104 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
105 /** Set the global font properties. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
106 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
107 virtual GuiFont* setDefaultFont(const std::string& path, |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
108 unsigned int size, const std::string& glyphs); |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
109 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
110 /** Gets font with given properties. Note that font will be owned by |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
111 * guimanager |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
112 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
113 virtual GuiFont* createFont(const std::string& path = "", |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
114 unsigned int size = 0, const std::string& glyphs = ""); |
255
51cc05d862f2
Merged editor_rewrite branch to trunk.
cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
157
diff
changeset
|
115 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
116 /** Releases given font. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
117 */ |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
118 virtual void releaseFont(GuiFont* font); |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
119 |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
120 virtual void invalidateFonts(); |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
121 |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
122 protected: |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
123 // Whether the console is visible. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
124 bool m_console_visible; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
125 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
126 private: |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
127 // pool used for images |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
128 ImagePool& m_image_pool; |
157
bb9902910067
input_rework merged!
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
129 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
130 // The console. |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
131 Console* m_console; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
132 |
697
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
133 // The fonts used |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
134 std::vector<GuiFont*> m_fonts; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
135 // default font settings |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
136 std::string m_fontpath; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
137 std::string m_fontglyphs; |
ecaa4d98f05f
Abstracted the GUI code and refactored the GUIChan-specific code into its own module.
M. George Hansen <technopolitica@gmail.com>
parents:
654
diff
changeset
|
138 int m_fontsize; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
139 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
140 } |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
141 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
142 #endif |