テキストの属性を保持するクラス [詳細]
#include <sggraphics.h>
Public メソッド | |
| SGTextAttribute () | |
| コンストラクタ | |
| SGTextAttribute (int fontid, int marginx=5, int marginy=0, int align=0|(0<< 2), unsigned int col=((((unsigned int) 0x00)<< 24)|(((unsigned int) 0x00)<< 16)|(((unsigned int) 0x00)<< 8)|0xff), unsigned int colefct=((((unsigned int) 0x78)<< 24)|(((unsigned int) 0x78)<< 16)|(((unsigned int) 0x78)<< 8)|0xff), int spc=0, int vertical=0) | |
| コンストラクタ | |
| virtual | ~SGTextAttribute () |
| デストラクタ | |
| void | SetFontAttr (int fontid, int marginx=5, int marginy=0, int align=0|(0<< 2), unsigned int col=((((unsigned int) 0x00)<< 24)|(((unsigned int) 0x00)<< 16)|(((unsigned int) 0x00)<< 8)|0xff), unsigned int colefct=((((unsigned int) 0x78)<< 24)|(((unsigned int) 0x78)<< 16)|(((unsigned int) 0x78)<< 8)|0xff), int spc=0, int vertical=0) |
| テキストの属性を設定する。 | |
| void | SetFontId (int id) |
| フォントのリソースIDを設定する。 | |
| int | GetFontId () |
| フォントのリソースIDを取得する。 | |
| void | SetMarginX (int margin) |
| 左右のマージン(余白)を設定する。 | |
| int | GetMarginX () |
| 左右のマージン(余白)を取得する。 | |
| void | SetMarginY (int margin) |
| 上下のマージン(余白)を設定する。 | |
| int | GetMarginY () |
| 上下のマージン(余白)を取得する。 | |
| void | SetAlign (int align) |
| 文字列の配置を設定する。 | |
| int | GetAlign () |
| テキスト配置情報を取得する。 | |
| void | SetColor (unsigned int col) |
| テキストの色を設定する。 | |
| int | GetColor () |
| テキストの色を取得する。 | |
| void | SetColorEffect (unsigned int col) |
| テキストの効果色を設定する。 | |
| int | GetColorEffect () |
| テキストの効果色を取得する。 | |
| void | SetLinespace (int spc) |
| 改行幅を設定する。 | |
| int | GetLinespace () |
| 改行幅を取得する。 | |
| void | SetVertical (int flag) |
| 縦書き/横書き情報を設定する。 | |
| int | IsVertical () |
| 縦書き/横書き情報を取得する。 | |
Protected 変数 | |
| int | mFontId |
| (未記入) | |
| int | mMarginX |
| (未記入) | |
| int | mMarginY |
| (未記入) | |
| int | mAlign |
| (未記入) | |
| int | mLinespace |
| (未記入) | |
| unsigned int | mColor |
| (未記入) | |
| unsigned int | mColorEffect |
| (未記入) | |
| int | mVertical |
テキストの属性を保持するクラス
テキストの属性を保持するクラスです。
テキスト表示を必要とするオブジェクトやリソースクラスのメンバ変数として使用されています。
どのクラスも GetTextAttr()でメンバ変数へアクセス出来ます。
| SGTextAttribute | ( | ) |
コンストラクタ
テキストの属性を保持するクラスです。
テキスト表示を必要とするオブジェクトやリソースクラスのメンバ変数として使用されています。
どのクラスも GetTextAttr()で SGTextAttribute クラスを取得できますので、 メンバ変数へアクセスすることが出来ます。
| SGTextAttribute | ( | int | fontid, | |
| int | marginx = 5, |
|||
| int | marginy = 0, |
|||
| int | align = 0 | (0<<2), |
|||
| unsigned int | col = ((((unsigned int) 0x00 )<<24)|(((unsigned int) 0x00 )<<16)|(((unsigned int) 0x00 )<<8)|0xff), |
|||
| unsigned int | colefct = ((((unsigned int) 0x78 )<<24)|(((unsigned int) 0x78 )<<16)|(((unsigned int) 0x78 )<<8)|0xff), |
|||
| int | spc = 0, |
|||
| int | vertical = 0 | |||
| ) |
コンストラクタ
テキストの属性を保持するクラスです。
テキスト表示を必要とするオブジェクトやリソースクラスのメンバ変数として使用されています。
どのクラスも GetTextAttr()で SGTextAttribute クラスを取得できますので、 メンバ変数へアクセスすることが出来ます。
| fontid | フォントID | |
| marginx | 横マージン (5) | |
| marginy | 縦マージン (0) | |
| align | 配置 左右方向の寄せ SG_ALIGN_CENTER 中央(既定値) SG_ALIGN_LEFT 左寄せ SG_ALIGN_RIGHT 右寄せ 上下方向の寄せ SG_ALIGN_MIDDLE 中央(既定値) SG_ALIGN_TOP 上寄せ SG_ALIGN_BOTTOM 下寄せ 属性 SG_ALIGN_XSTRETCH 横方向が枠に収まらない時は幅を縮小して全部を表示します。 SG_ALIGN_YSTRETCH 縦方向が枠に収まらない時は高さを縮小して全部を表示します。 SG_ALIGN_STRETCH 横方向または縦方向が枠に収まらない時は縮小して全部を表示します。 SG_ALIGN_COMMA 3桁毎にカンマを追加し、通貨表示にします(1,234,567) SG_ALIGN_NOCLIP 枠からはみ出す場合でもクリップしないでそのまま表示します。 左右方向の寄せと上下方向の寄せをそれぞれ指定できます。 | |
| col | 文字色(黒) | |
| colsub | 効果色(グレー) | |
| colbg | 背景色 | |
| spc | 改行幅 | |
| vertical | 0:横書き 1:縦書き |
| ~SGTextAttribute | ( | ) | [virtual] |
デストラクタ
| void SetFontAttr | ( | int | fontid, | |
| int | marginx = 5, |
|||
| int | marginy = 0, |
|||
| int | align = 0 | (0<<2), |
|||
| unsigned int | col = ((((unsigned int) 0x00 )<<24)|(((unsigned int) 0x00 )<<16)|(((unsigned int) 0x00 )<<8)|0xff), |
|||
| unsigned int | colsub = ((((unsigned int) 0x78 )<<24)|(((unsigned int) 0x78 )<<16)|(((unsigned int) 0x78 )<<8)|0xff), |
|||
| int | spc = 0, |
|||
| int | vertical = 0 | |||
| ) |
テキストの属性を設定する。
必要な情報を登録します。
テキストの属性を保持するクラスです。
テキスト表示を必要とするオブジェクトやリソースクラスのメンバ変数として使用されています。
どのクラスも GetTextAttr()でメンバ変数へアクセス出来ます。
| fontid | フォントID | |
| marginx | 横マージン (5) | |
| marginy | 縦マージン (0) | |
| align | 配置 左右方向の寄せ SG_ALIGN_CENTER 中央(既定値) SG_ALIGN_LEFT 左寄せ SG_ALIGN_RIGHT 右寄せ 上下方向の寄せ SG_ALIGN_MIDDLE 中央(既定値) SG_ALIGN_TOP 上寄せ SG_ALIGN_BOTTOM 下寄せ 属性 SG_ALIGN_XSTRETCH 横方向が枠に収まらない時は幅を縮小して全部を表示します。 SG_ALIGN_YSTRETCH 縦方向が枠に収まらない時は高さを縮小して全部を表示します。 SG_ALIGN_STRETCH 横方向または縦方向が枠に収まらない時は縮小して全部を表示します。 SG_ALIGN_COMMA 3桁毎にカンマを追加し、通貨表示にします(1,234,567) SG_ALIGN_NOCLIP 枠からはみ出す場合でもクリップしないでそのまま表示します。 左右方向の寄せと上下方向の寄せをそれぞれ指定できます。 | |
| col | 文字色(黒) | |
| colsub | 効果色(グレー) | |
| colbg | 背景色 | |
| spc | 改行幅 | |
| vertical | 0:横書き 1:縦書き |
| void SetFontId | ( | int | id | ) |
フォントのリソースIDを設定する。
フォントのリソースIDを設定します
| id | フォントのリソースID |
| int GetFontId | ( | ) |
フォントのリソースIDを取得する。
フォントのリソースIDを取得します。
| void SetMarginX | ( | int | margin | ) |
左右のマージン(余白)を設定する。
左右のマージン(余白)を設定します。
| margin | マージン(余白) |
| int GetMarginX | ( | ) |
左右のマージン(余白)を取得する。
左右のマージン(余白)を取得します。
| void SetMarginY | ( | int | margin | ) |
上下のマージン(余白)を設定する。
上下のマージン(余白)を設定します。
| margin | マージン(余白) |
| int GetMarginY | ( | ) |
上下のマージン(余白)を取得する。
上下のマージン(余白)を取得します。
| void SetAlign | ( | int | align | ) |
文字列の配置を設定する。
文字列の配置を設定します。
| align | 配置 左右方向の寄せ SG_ALIGN_CENTER 中央 SG_ALIGN_LEFT 左寄せ SG_ALIGN_RIGHT 右寄せ 上下方向の寄せ SG_ALIGN_MIDDLE 中央 SG_ALIGN_TOP 上寄せ SG_ALIGN_BOTTOM 下寄せ 属性 SG_ALIGN_XSTRETCH 横方向が枠に収まらない時は幅を縮小して全部を表示します。 SG_ALIGN_YSTRETCH 縦方向が枠に収まらない時は高さを縮小して全部を表示します。 SG_ALIGN_STRETCH 横方向または縦方向が枠に収まらない時は縮小して全部を表示します。 SG_ALIGN_COMMA 3桁毎にカンマを追加し、通貨表示にします(1,234,567) SG_ALIGN_NOCLIP 枠からはみ出す場合でもクリップしないでそのまま表示します。 左右方向の寄せと上下方向の寄せをそれぞれ指定できます。 |
| int GetAlign | ( | ) |
テキスト配置情報を取得する。
テキスト配置情報を取得します。
SG_ALIGN_CENTER 中央 SG_ALIGN_LEFT 左寄せ SG_ALIGN_RIGHT 右寄せ
SG_ALIGN_MIDDLE 中央 SG_ALIGN_TOP 上寄せ SG_ALIGN_BOTTOM 下寄せ
SG_ALIGN_XSTRETCH 横方向が枠に収まらない時は幅を縮小して全部を表示します。 SG_ALIGN_YSTRETCH 縦方向が枠に収まらない時は高さを縮小して全部を表示します。 SG_ALIGN_STRETCH 横方向または縦方向が枠に収まらない時は縮小して全部を表示します。 SG_ALIGN_COMMA 3桁毎にカンマを追加し、通貨表示にします(1,234,567) SG_ALIGN_NOCLIP 枠からはみ出す場合でもクリップしないでそのまま表示します。
| void SetColor | ( | unsigned int | col | ) |
テキストの色を設定する。
テキストの色を設定します。
| col | 色 |
| int GetColor | ( | ) |
テキストの色を取得する。
テキストの色を取得します。
| void SetColorEffect | ( | unsigned int | col | ) |
テキストの効果色を設定する。
テキストの効果色を設定します。
| col | 色 |
| int GetColorEffect | ( | ) |
テキストの効果色を取得する。
テキストの効果色を取得します。
| void SetLinespace | ( | int | spc | ) |
改行幅を設定する。
改行幅を設定します。
| spc | 改行幅 |
| int GetLinespace | ( | ) |
改行幅を取得する。
改行幅を取得します。
| void SetVertical | ( | int | flag | ) |
縦書き/横書き情報を設定する。
縦書き/横書き情報を設定します。
| flag | 0:横書き 1:縦書き |
| int IsVertical | ( | ) |
縦書き/横書き情報を取得する。
縦書き/横書き情報を取得します。
int mFontId [protected] |
(未記入)
int mMarginX [protected] |
(未記入)
int mMarginY [protected] |
(未記入)
int mAlign [protected] |
(未記入)
int mLinespace [protected] |
(未記入)
unsigned int mColor [protected] |
(未記入)
unsigned int mColorEffect [protected] |
(未記入)