Class: Fzeet::Scintilla
- Includes:
- ScintillaMethods
- Defined in:
- lib/fzeet/windows/scintilla.rb
Constant Summary collapse
- Prefix =
{ xstyle: [:ws_ex_], style: [:ws_], message: [:sci_, :wm_], notification: [:scn_, :scen_, :nm_] }
Constants included from WindowMethods
Instance Attribute Summary
Attributes inherited from Control
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parent, id, opts = {}, &block) ⇒ Scintilla
constructor
A new instance of Scintilla.
- #on(notification, &block) ⇒ Object
Methods included from ScintillaMethods
#dirty=, #dirty?, #font, #font=, #fontSize, #fontSize=, #tabWidth, #tabWidth=, #text, #text=
Methods inherited from Control
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
Constructor Details
#initialize(parent, id, opts = {}, &block) ⇒ Scintilla
Returns a new instance of Scintilla.
2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 |
# File 'lib/fzeet/windows/scintilla.rb', line 2367 def initialize(parent, id, opts = {}, &block) super('Scintilla', parent, id, opts) @dirty = false on(:savepointleft) { @dirty = true } on(:savepointreached) { @dirty = false } @parent.on(:notify, @id, &block) if block end |
Class Method Details
.crackNotification(args) ⇒ Object
Instance Method Details
#on(notification, &block) ⇒ Object
2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 |
# File 'lib/fzeet/windows/scintilla.rb', line 2378 def on(notification, &block) case c = Fzeet.constant(notification, *self.class::Prefix[:notification]) when \ Windows::SCEN_CHANGE, Windows::SCEN_SETFOCUS, Windows::SCEN_KILLFOCUS @parent.on(:command, @id, c, &block) else @parent.on(:notify, @id, c, &block) end self end |