Documentation ¶
Index ¶
Constants ¶
View Source
const WM_CHOOSEFONT_GETLOGFONT = (win32.WM_USER + 1)
Variables ¶
View Source
var ErrNotChild = errors.New("no a child")
Functions ¶
Types ¶
type ChooseFontSpec ¶
type ChooseFontSpec struct { Owner win32.HWND LogFont *font.LogFont // Initial value or nil. /* The following flags are automatically removed(added): CF_INITTOLOGFONTSTRUCT CF_APPLY CF_EFFECTS CF_ENABLEHOOK CF_ENABLETEMPLATE CF_ENABLETEMPLATEHANDLE CF_LIMITSIZE CF_USESTYLE */ Flags win32.CHOOSE_FONT_FLAG // If not nil, font effects(color, strikeout, underline) are enabled. // Strikeout and underline are specified in LogFont. Color *win32.COLORREF PointSizeLimit *Limit // In point. Nil for none. OnApply func(curFont *FontChosen) // If not nil, an Apply button is displayed, and OnApply is called if it is pressed. }
type Dialog ¶
type Dialog struct { window.Window OnCreate func(dlg *Dialog) OnOK func(dlg *Dialog) bool OnCancel func(dlg *Dialog) bool // contains filtered or unexported fields }
func (*Dialog) Reposition ¶
Reposition repositions a top-level dialog box so that it fits within the desktop area.
func (*Dialog) SetCancel ¶
SetCancel sets the Cancel button of this dialog. Panic if btn is not a child of d.
func (*Dialog) SetDefault ¶
SetDefault sets the default button of this dialog. Panic if btn is not a child of d.
func (*Dialog) SetDlgProc ¶
type FontChosen ¶
type FontChosen struct { Font *font.LogFont Type win32.CHOOSE_FONT_TYPE PointSize win32.INT Color win32.COLORREF }
func ChooseFont ¶
func ChooseFont(spec *ChooseFontSpec) (*FontChosen, error)
ChooseFont displays a Font dialog. If the user cancels or closes the Font dialog box, it returns nil, nil. Nil spec means default setting.
Click to show internal directories.
Click to hide internal directories.