Class: Fzeet::Static

Inherits:
Control show all
Includes:
StaticMethods
Defined in:
lib/fzeet/windows/user/Control/Static.rb

Constant Summary collapse

Prefix =
{
	xstyle: [:ws_ex_],
	style: [:ss_, :ws_],
	message: [:stm_, :wm_],
	notification: [:stn_]
}

Constants included from WindowMethods

WindowMethods::EnumChildProc

Instance Attribute Summary

Attributes inherited from Control

#id, #parent

Instance Method Summary collapse

Methods included from StaticMethods

#clear, #image=

Methods inherited from Control

crackNotification, #dispose

Methods included from WindowMethods

#[], #capture=, #capture?, #dialog=, #dialog?, #dlgmsg?, #drawMenuBar, #eachChild, #enabled=, #enabled?, #focus=, #focus?, #invalidate, #location, #location=, #long, #menu, #menu=, #message, #paint, #position, #position=, #postmsg, #question, #rect, #reframe, #sendmsg, #show, #size, #size=, #style, #style?, #text, #text=, #textlen, #topmost=, #topmost?, #update, #visible=, #visible?, #xstyle, #xstyle?

Methods included from Toggle

#toggle

Constructor Details

#initialize(parent, id, opts = {}, &block) ⇒ Static

Returns a new instance of Static.



66
67
68
69
70
71
72
# File 'lib/fzeet/windows/user/Control/Static.rb', line 66

def initialize(parent, id, opts = {}, &block)
	super('Static', parent, id, opts)

	style >> :tabstop

	@parent.on(:command, @id, &block) if block
end

Instance Method Details

#on(notification, &block) ⇒ Object



74
75
76
77
78
# File 'lib/fzeet/windows/user/Control/Static.rb', line 74

def on(notification, &block)
	@parent.on(:command, @id, Fzeet.constant(notification, *self.class::Prefix[:notification]), &block)

	self
end