Font.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2015, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVisualization/Base.h"
16 #include "CeeCore/RefCountedObject.h"
17 #include "CeeCore/PtrRef.h"
18 #include "CeeCore/Str.h"
19 
20 namespace cvf { class Font; }
21 
22 namespace cee {
23 namespace vis {
24 
25 //==================================================================================================
26 //
27 //
28 //
29 //==================================================================================================
30 class CEE_VIS_EXPORT Font : public RefCountedObject
31 {
32 public:
33  virtual ~Font();
34 
35  virtual unsigned int pointSize() const;
36  Str name() const;
37 
38  float lineSpacing() const;
39  void setLineSpacing(float factor);
40 
41  static PtrRef<Font> createNormalFont();
42  static PtrRef<Font> createLargeFont();
43  static PtrRef<Font> createTrueTypeFont(const Str& filename, unsigned int pointSize); // Deprecated, to be removed
44 
45 protected:
46  Font();
47 
48 public:
49  cvf::Font* internal_cvfFont();
50 
51 private:
52  CEE_PRIVATE_IMPL(Font);
53  CEE_BASE_F(TrueTypeFont);
54  CEE_DISALLOW_COPY_AND_ASSIGN(Font);
55 };
56 
57 } // namespace vis
58 } // namespace cee
Definition: LogEvent.h:19
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A general unicode based string class.
Definition: Str.h:28
Smart pointer class used for handling reference counted objects (that derive from Object)...
Definition: PtrRef.h:26
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
A true type font used for text drawing.
Definition: TrueTypeFont.h:27
A font used for text drawing.
Definition: Font.h:30