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

« back to all changes in this revision

Viewing changes to Tools/FontViewer/FontPanel.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           09/2008
5
 
*/
6
 
#ifndef __FONT_PANEL_H__
7
 
#define __FONT_PANEL_H__
8
 
 
9
 
#include <MyGUI.h>
10
 
#include "MyGUI_ResourceTrueTypeFont.h"
11
 
#include "BaseLayout/BaseLayout.h"
12
 
#include "FontView.h"
13
 
#include "TextureView.h"
14
 
 
15
 
namespace demo
16
 
{
17
 
 
18
 
        class FontPanel :
19
 
                public wraps::BaseLayout
20
 
        {
21
 
        public:
22
 
                FontPanel();
23
 
                virtual ~FontPanel();
24
 
 
25
 
        private:
26
 
                void initializeEditBox(MyGUI::EditBox* _editBox);
27
 
                void initializeComboBox(MyGUI::ComboBox* _comboBox);
28
 
 
29
 
                void update();
30
 
                void enableSave(bool _enable, const MyGUI::UString& fileName = MyGUI::UString());
31
 
 
32
 
                void notifyTextChange(MyGUI::EditBox* _sender);
33
 
                void notifyComboBoxChangePosition(MyGUI::ComboBox* _sender, size_t _index);
34
 
                void notifyComboBoxKeySetFocus(MyGUI::Widget* _sender, MyGUI::Widget* _old);
35
 
                void notifyComboBoxKeyLostFocus(MyGUI::Widget* _sender, MyGUI::Widget* _old);
36
 
                void notifyMouseButtonClick(MyGUI::Widget* _widget);
37
 
 
38
 
                void generateFontTTFXml(MyGUI::xml::ElementPtr _root, const std::string& _fontName);
39
 
                void generateFontManualXml(MyGUI::xml::ElementPtr _root, const std::string& _textureName, const std::string& _fontName);
40
 
 
41
 
                void saveTexture(const std::string& _fontName, const std::string& _fileName);
42
 
                void saveFontTTFXml(const std::string& _fontName, const std::string& _fileName);
43
 
                void saveFontManualXml(const std::string& _fontName, const std::string& _textureName, const std::string& _fileName);
44
 
 
45
 
                void removeFont(const std::string& _fontName);
46
 
 
47
 
                void addCode(MyGUI::xml::Element* _node, MyGUI::Char _code, MyGUI::ResourceTrueTypeFont* _font, bool _isSubstitute);
48
 
 
49
 
        private:
50
 
                MyGUI::ComboBox* mComboFont;
51
 
                MyGUI::EditBox* mEditSize;
52
 
                MyGUI::ComboBox* mComboResolution;
53
 
                MyGUI::ComboBox* mComboAntialias;
54
 
                MyGUI::ComboBox* mComboSpace;
55
 
                MyGUI::ComboBox* mComboTab;
56
 
                MyGUI::ComboBox* mComboOffset;
57
 
                MyGUI::EditBox* mEditRange1A;
58
 
                MyGUI::EditBox* mEditRange1B;
59
 
                MyGUI::EditBox* mEditRange2A;
60
 
                MyGUI::EditBox* mEditRange2B;
61
 
                MyGUI::EditBox* mEditHideA;
62
 
                MyGUI::EditBox* mEditHideB;
63
 
                MyGUI::ComboBox* mComboSubstituteCode;
64
 
                MyGUI::Button* mButtonGenerate;
65
 
                MyGUI::EditBox* mEditSaveFileName;
66
 
                MyGUI::Button* mButtonSave;
67
 
 
68
 
                std::string mFontName;
69
 
                int mFontHeight;
70
 
 
71
 
                FontView* mFontView;
72
 
                TextureView* mTextureView;
73
 
        };
74
 
 
75
 
} // namespace demo
76
 
 
77
 
#endif // __FONT_PANEL_H__