Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreFontPref.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_FONT_PREF__
8#define __HDI_CORE_FONT_PREF__
9
10#include "hdicorePrefData.h"
11
12namespace hdi
13{
14 namespace core
15 {
16 class Font;
17
21 class FontPref : public PrefData
22 {
23 public:
35
43 FontPref(const FontPref& f_);
44
57 FontPref(const Font& face_, const double size_, const std::string& name_ = "");
58
64 virtual ~FontPref();
65
74 virtual FontPref& operator=(const FontPref& rhs_);
75
89 virtual FontPref* clone() const;
90
98 virtual std::unique_ptr<Font> font() const;
99
108 virtual bool setFont(const Font& font_);
109
117 virtual double size() const;
118
127 virtual bool setSize(const double size_);
128 };
129
130 typedef std::unique_ptr<FontPref> FontPrefUP;
131 typedef std::shared_ptr<FontPref> FontPrefSP;
132 typedef std::weak_ptr<FontPref> FontPrefWP;
133 }
134}
135
136#endif
137// __HDI_CORE_FONT_PREF__
Font class to allow for easy font manipulation.
Definition: hdicoreFont.h:183
Allows for storage of font faces and sizes.
Definition: hdicoreFontPref.h:22
FontPref(const Font &face_, const double size_, const std::string &name_="")
Constructs a FontPref object, with new data, to be added to a container at a later time.
virtual FontPref * clone() const
Convenience method to clone an FontPref object on the heap.
virtual double size() const
Gets the font size for this object.
FontPref(const FontPref &f_)
Constructs a new FontPref object from an existing FontPref object (copy constructor)
virtual std::unique_ptr< Font > font() const
Gets the font face for this object.
FontPref()
Constructs an empty FontPref object.
virtual bool setSize(const double size_)
Sets the font size for this object.
virtual FontPref & operator=(const FontPref &rhs_)
Allows one FontPref object to be assigned from another.
virtual bool setFont(const Font &font_)
Sets the font face for this object.
virtual ~FontPref()
Destructs a FontPref object.
Base class for persistent data objects, stored via JSON.
Definition: hdicorePrefData.h:25
Header file for general preference data storage.