NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
2d_custom_font_registrar_interface.h
1 #ifndef SDK_2D_CUSTOM_FONT_REGISTRAR_INTERFACE_H_
11 #define SDK_2D_CUSTOM_FONT_REGISTRAR_INTERFACE_H_
12 
13 #include <base/inc/platform.h>
14 #include <base/inc/base_types.h>
17 #include "2d_graphics_objects.h"
18 
19 namespace sdk {
20 namespace gfx {
21 
24 class I2DRegisteredFontEnumerator : public sdk::ISDKComponent
25 {
26 public:
28  virtual SDKResult SDK_CALLTYPE Reset() throw() = 0;
29 
31  virtual SDKResult SDK_CALLTYPE Next(SDKString& font_family_name) throw() = 0;
32 
34  SDK_IMPLEMENT_IID(I2DRegisteredFontEnumerator)
35  SDK_END_INTERFACE(I2DRegisteredFontEnumerator)
36 };
37 SDK_DECLARE_IID(I2DRegisteredFontEnumerator)
38 
39 class I2DCustomFontRegistrar : public sdk::ISDKComponent
42 {
43  public:
45  virtual SDKResult SDK_CALLTYPE GetParent(sdk::gfx::RenderTargetFactorySP& parent) const throw() = 0;
46 
48  virtual SDKResult SDK_CALLTYPE RegisterFont(const SDKString& font_family_name,
49  const sdk::base::SDKStreamSP& font_stream) throw() = 0;
51  virtual SDKResult SDK_CALLTYPE UnregisterFont(const SDKString& font_family_name) throw() = 0;
52 
55  virtual SDKResult SDK_CALLTYPE GetRegisteredFontEnumerator(
56  RegisteredFontEnumeratorSP& enumerator) const throw() = 0;
57 
59  SDK_IMPLEMENT_IID(I2DCustomFontRegistrar)
60  SDK_END_INTERFACE(I2DCustomFontRegistrar)
61 };
62 SDK_DECLARE_IID(I2DCustomFontRegistrar)
63 
64 } // namespace gfx
65 } // namespace sdk
66 
67 #endif // SDK_2D_CUSTOM_FONT_REGISTRAR_INTERFACE_H_
base_types.h
SDK base types.
sdk::gfx::I2DCustomFontRegistrar::UnregisterFont
virtual SDKResult SDK_CALLTYPE UnregisterFont(const SDKString &font_family_name)=0
Removes previously registered font from custom font collection.
SDKResult
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
stream_interface.h
Generic data stream interface.
SDKRefPtr
A smart pointer class for managing SDK components interface pointers.
Definition: sdk_ref_ptr.h:23
sdk::gfx::I2DRegisteredFontEnumerator::Reset
virtual SDKResult SDK_CALLTYPE Reset()=0
Resets the iterator position to start.
sdk_component_interface.h
Common base SDK interfaces.
sdk::gfx::I2DCustomFontRegistrar::GetParent
virtual SDKResult SDK_CALLTYPE GetParent(sdk::gfx::RenderTargetFactorySP &parent) const =0
Returns the parent factory instance, which created the given instance.
platform.h
Describes the platform constants.
sdk::gfx::I2DRegisteredFontEnumerator::Next
virtual SDKResult SDK_CALLTYPE Next(SDKString &font_family_name)=0
Returns next registered custom font family name.
sdk::gfx::I2DCustomFontRegistrar::GetRegisteredFontEnumerator
virtual SDKResult SDK_CALLTYPE GetRegisteredFontEnumerator(RegisteredFontEnumeratorSP &enumerator) const =0
Returns a registered font enumerator, which allows to enum all of registered custom font family names...
sdk::gfx::I2DCustomFontRegistrar
Allows to register/unregister custom font.
Definition: 2d_custom_font_registrar_interface.h:41
sdk::gfx::I2DCustomFontRegistrar::RegisterFont
virtual SDKResult SDK_CALLTYPE RegisterFont(const SDKString &font_family_name, const sdk::base::SDKStreamSP &font_stream)=0
Registers new custom font in custom font collection.
sdk::gfx::I2DRegisteredFontEnumerator
Enumerates all of registered custom font IDs.
Definition: 2d_custom_font_registrar_interface.h:24