Class: Fzeet::Edit

Inherits:
Control show all
Includes:
EditMethods
Defined in:
lib/fzeet/windows/user/Control/Edit.rb

Constant Summary collapse

Prefix =
{
	xstyle: [:ws_ex_],
	style: [:es_, :ws_],
	message: [:em_, :wm_],
	notification: [:en_]
}

Constants included from WindowMethods

WindowMethods::EnumChildProc

Instance Attribute Summary

Attributes inherited from Control

#id, #parent

Instance Method Summary collapse

Methods included from EditMethods

#clear, #cuebanner=, #hideBalloontip, #select, #showBalloontip

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) ⇒ Edit

Returns a new instance of Edit.



107
108
109
110
111
112
113
# File 'lib/fzeet/windows/user/Control/Edit.rb', line 107

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

	style << :border; reframe

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

Instance Method Details

#on(notification, &block) ⇒ Object



115
116
117
118
119
# File 'lib/fzeet/windows/user/Control/Edit.rb', line 115

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

	self
end