ReactOS 0.4.16-dev-257-g6aa11ac
StringFormat Class Reference

#include <gdiplusstringformat.h>

Inheritance diagram for StringFormat:
Collaboration diagram for StringFormat:

Public Member Functions

 StringFormat (INT formatFlags=0, LANGID language=LANG_NEUTRAL)
 
 StringFormat (const StringFormat *format)
 
StringFormatClone () const
 
 ~StringFormat ()
 
StringAlignment GetAlignment () const
 
LANGID GetDigitSubstitutionLanguage () const
 
StringDigitSubstitute GetDigitSubstitutionMethod () const
 
INT GetFormatFlags () const
 
HotkeyPrefix GetHotkeyPrefix () const
 
Status GetLastStatus () const
 
StringAlignment GetLineAlignment () const
 
INT GetMeasurableCharacterRangeCount () const
 
INT GetTabStopCount () const
 
Status GetTabStops (INT count, REAL *firstTabOffset, REAL *tabStops) const
 
StringTrimming GetTrimming () const
 
Status SetAlignment (StringAlignment align)
 
Status SetDigitSubstitution (LANGID language, StringDigitSubstitute substitute)
 
Status SetFormatFlags (INT flags)
 
Status SetHotkeyPrefix (HotkeyPrefix hotkeyPrefix)
 
Status SetLineAlignment (StringAlignment align)
 
Status SetMeasurableCharacterRanges (INT rangeCount, const CharacterRange *ranges)
 
Status SetTabStops (REAL firstTabOffset, INT count, const REAL *tabStops)
 
Status SetTrimming (StringTrimming trimming)
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Static Public Member Functions

static const StringFormatGenericDefault ()
 
static const StringFormatGenericTypographic ()
 

Protected Member Functions

 StringFormat (GpStringFormat *format, Status status)
 
Status SetStatus (Status status) const
 

Protected Attributes

GpStringFormatnativeFormat
 
Status lastStatus
 

Friends

GpStringFormat *& getNat (const StringFormat *sf)
 

Detailed Description

Definition at line 22 of file gdiplusstringformat.h.

Constructor & Destructor Documentation

◆ StringFormat() [1/3]

StringFormat::StringFormat ( INT  formatFlags = 0,
LANGID  language = LANG_NEUTRAL 
)
inline

Definition at line 25 of file gdiplusstringformat.h.

26 {
27 lastStatus = DllExports::GdipCreateStringFormat(formatFlags, language, &nativeFormat);
28 }
GpStringFormat * nativeFormat
#define NULL
Definition: types.h:112

◆ StringFormat() [2/3]

StringFormat::StringFormat ( const StringFormat format)
inline

Definition at line 30 of file gdiplusstringformat.h.

31 {
32 lastStatus = DllExports::GdipCloneStringFormat(format ? format->nativeFormat : NULL, &nativeFormat);
33 }
Definition: format.c:58

◆ ~StringFormat()

StringFormat::~StringFormat ( )
inline

Definition at line 50 of file gdiplusstringformat.h.

51 {
52 DllExports::GdipDeleteStringFormat(nativeFormat);
53 }

◆ StringFormat() [3/3]

StringFormat::StringFormat ( GpStringFormat format,
Status  status 
)
inlineprotected

Definition at line 203 of file gdiplusstringformat.h.

204 {
205 }
Definition: ps.c:97

Member Function Documentation

◆ Clone()

StringFormat * StringFormat::Clone ( ) const
inline

Definition at line 36 of file gdiplusstringformat.h.

37 {
38 GpStringFormat *cloneFormat = NULL;
39
40 lastStatus = DllExports::GdipCloneStringFormat(nativeFormat, &cloneFormat);
41 if (lastStatus != Ok)
42 return NULL;
43
44 StringFormat *newFormat = new StringFormat(cloneFormat, lastStatus);
45 if (!newFormat)
46 DllExports::GdipDeleteStringFormat(cloneFormat);
47 return newFormat;
48 }
@ Ok
Definition: gdiplustypes.h:26

◆ GenericDefault()

static const StringFormat * StringFormat::GenericDefault ( )
inlinestatic

Definition at line 56 of file gdiplusstringformat.h.

57 {
58 return NULL; // FIXME
59 }

◆ GenericTypographic()

static const StringFormat * StringFormat::GenericTypographic ( )
inlinestatic

Definition at line 62 of file gdiplusstringformat.h.

63 {
64 return NULL; // FIXME
65 }

◆ GetAlignment()

StringAlignment StringFormat::GetAlignment ( ) const
inline

Definition at line 68 of file gdiplusstringformat.h.

69 {
70 StringAlignment alignment;
71 SetStatus(DllExports::GdipGetStringFormatAlign(nativeFormat, &alignment));
72 return alignment;
73 }
Status SetStatus(Status status) const
StringAlignment
Definition: gdiplusenums.h:264

◆ GetDigitSubstitutionLanguage()

LANGID StringFormat::GetDigitSubstitutionLanguage ( ) const
inline

Definition at line 76 of file gdiplusstringformat.h.

77 {
78 LANGID language;
79 SetStatus(DllExports::GdipGetStringFormatDigitSubstitution(nativeFormat, &language, NULL));
80 return language;
81 }
USHORT LANGID
Definition: mui.h:9

◆ GetDigitSubstitutionMethod()

StringDigitSubstitute StringFormat::GetDigitSubstitutionMethod ( ) const
inline

Definition at line 84 of file gdiplusstringformat.h.

85 {
86 StringDigitSubstitute substitute;
87 SetStatus(DllExports::GdipGetStringFormatDigitSubstitution(nativeFormat, NULL, &substitute));
88 return substitute;
89 }
StringDigitSubstitute
Definition: gdiplusenums.h:271

◆ GetFormatFlags()

INT StringFormat::GetFormatFlags ( ) const
inline

Definition at line 92 of file gdiplusstringformat.h.

93 {
94 INT flags;
95 SetStatus(DllExports::GdipGetStringFormatFlags(nativeFormat, &flags));
96 return flags;
97 }
GLbitfield flags
Definition: glext.h:7161
int32_t INT
Definition: typedefs.h:58

◆ GetHotkeyPrefix()

HotkeyPrefix StringFormat::GetHotkeyPrefix ( ) const
inline

Definition at line 100 of file gdiplusstringformat.h.

101 {
102 HotkeyPrefix hotkeyPrefix;
103 SetStatus(DllExports::GdipGetStringFormatHotkeyPrefix(nativeFormat, reinterpret_cast<INT *>(&hotkeyPrefix)));
104 return hotkeyPrefix;
105 }
HotkeyPrefix
Definition: gdiplusenums.h:312

◆ GetLastStatus()

Status StringFormat::GetLastStatus ( ) const
inline

Definition at line 108 of file gdiplusstringformat.h.

109 {
110 return lastStatus;
111 }

◆ GetLineAlignment()

StringAlignment StringFormat::GetLineAlignment ( ) const
inline

Definition at line 114 of file gdiplusstringformat.h.

115 {
116 StringAlignment alignment;
117 SetStatus(DllExports::GdipGetStringFormatLineAlign(nativeFormat, &alignment));
118 return alignment;
119 }

◆ GetMeasurableCharacterRangeCount()

INT StringFormat::GetMeasurableCharacterRangeCount ( ) const
inline

Definition at line 122 of file gdiplusstringformat.h.

123 {
124 INT count;
125 SetStatus(DllExports::GdipGetStringFormatMeasurableCharacterRangeCount(nativeFormat, &count));
126 return count;
127 }
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ GetTabStopCount()

INT StringFormat::GetTabStopCount ( ) const
inline

Definition at line 130 of file gdiplusstringformat.h.

131 {
132 INT count;
133 SetStatus(DllExports::GdipGetStringFormatTabStopCount(nativeFormat, &count));
134 return count;
135 }

◆ GetTabStops()

Status StringFormat::GetTabStops ( INT  count,
REAL firstTabOffset,
REAL tabStops 
) const
inline

Definition at line 138 of file gdiplusstringformat.h.

139 {
140 return SetStatus(DllExports::GdipGetStringFormatTabStops(nativeFormat, count, firstTabOffset, tabStops));
141 }

◆ GetTrimming()

StringTrimming StringFormat::GetTrimming ( ) const
inline

Definition at line 144 of file gdiplusstringformat.h.

145 {
146 StringTrimming trimming;
147 SetStatus(DllExports::GdipGetStringFormatTrimming(nativeFormat, &trimming));
148 return trimming;
149 }
StringTrimming
Definition: gdiplusenums.h:292

◆ SetAlignment()

Status StringFormat::SetAlignment ( StringAlignment  align)
inline

Definition at line 152 of file gdiplusstringformat.h.

153 {
154 return SetStatus(DllExports::GdipSetStringFormatAlign(nativeFormat, align));
155 }
int align(int length, int align)
Definition: dsound8.c:36

◆ SetDigitSubstitution()

Status StringFormat::SetDigitSubstitution ( LANGID  language,
StringDigitSubstitute  substitute 
)
inline

Definition at line 158 of file gdiplusstringformat.h.

159 {
160 return SetStatus(DllExports::GdipSetStringFormatDigitSubstitution(nativeFormat, language, substitute));
161 }

◆ SetFormatFlags()

Status StringFormat::SetFormatFlags ( INT  flags)
inline

Definition at line 164 of file gdiplusstringformat.h.

165 {
166 return SetStatus(DllExports::GdipSetStringFormatFlags(nativeFormat, flags));
167 }

◆ SetHotkeyPrefix()

Status StringFormat::SetHotkeyPrefix ( HotkeyPrefix  hotkeyPrefix)
inline

Definition at line 170 of file gdiplusstringformat.h.

171 {
172 return SetStatus(DllExports::GdipSetStringFormatHotkeyPrefix(nativeFormat, INT(hotkeyPrefix)));
173 }
#define INT
Definition: polytest.cpp:20

◆ SetLineAlignment()

Status StringFormat::SetLineAlignment ( StringAlignment  align)
inline

Definition at line 176 of file gdiplusstringformat.h.

177 {
178 return SetStatus(DllExports::GdipSetStringFormatLineAlign(nativeFormat, align));
179 }

◆ SetMeasurableCharacterRanges()

Status StringFormat::SetMeasurableCharacterRanges ( INT  rangeCount,
const CharacterRange ranges 
)
inline

Definition at line 182 of file gdiplusstringformat.h.

183 {
184 return SetStatus(DllExports::GdipSetStringFormatMeasurableCharacterRanges(nativeFormat, rangeCount, ranges));
185 }

◆ SetStatus()

◆ SetTabStops()

Status StringFormat::SetTabStops ( REAL  firstTabOffset,
INT  count,
const REAL tabStops 
)
inline

Definition at line 188 of file gdiplusstringformat.h.

189 {
190 return SetStatus(DllExports::GdipSetStringFormatTabStops(nativeFormat, firstTabOffset, count, tabStops));
191 }

◆ SetTrimming()

Status StringFormat::SetTrimming ( StringTrimming  trimming)
inline

Definition at line 194 of file gdiplusstringformat.h.

195 {
196 return SetStatus(DllExports::GdipSetStringFormatTrimming(nativeFormat, trimming));
197 }

Friends And Related Function Documentation

◆ getNat

GpStringFormat *& getNat ( const StringFormat sf)
friend

Definition at line 217 of file gdiplusstringformat.h.

218 {
219 return const_cast<StringFormat *>(sf)->nativeFormat;
220 }

Member Data Documentation

◆ lastStatus

Status StringFormat::lastStatus
mutableprotected

Definition at line 201 of file gdiplusstringformat.h.

Referenced by Clone(), GetLastStatus(), SetStatus(), and StringFormat().

◆ nativeFormat


The documentation for this class was generated from the following file: