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.
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 |
# File 'lib/fzeet/windows/scintilla.rb', line 2386 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
2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 |
# File 'lib/fzeet/windows/scintilla.rb', line 2352 def self.crackNotification(args) case args[:notification] when \ Windows::SCN_STYLENEEDED, Windows::SCN_CHARADDED, Windows::SCN_SAVEPOINTREACHED, Windows::SCN_SAVEPOINTLEFT, Windows::SCN_MODIFYATTEMPTRO, Windows::SCN_KEY, Windows::SCN_DOUBLECLICK, Windows::SCN_UPDATEUI, Windows::SCN_MODIFIED, Windows::SCN_MACRORECORD, Windows::SCN_MARGINCLICK, Windows::SCN_NEEDSHOWN, Windows::SCN_PAINTED, Windows::SCN_USERLISTSELECTION, Windows::SCN_URIDROPPED, Windows::SCN_DWELLSTART, Windows::SCN_DWELLEND, Windows::SCN_ZOOM, Windows::SCN_HOTSPOTCLICK, Windows::SCN_HOTSPOTDOUBLECLICK, Windows::SCN_CALLTIPCLICK, Windows::SCN_AUTOCSELECTION, Windows::SCN_INDICATORCLICK, Windows::SCN_INDICATORRELEASE, Windows::SCN_AUTOCCANCELLED, Windows::SCN_AUTOCCHARDELETED args[:scn] = Windows::SCNotification.new(FFI::Pointer.new(args[:lParam])) end end |
Instance Method Details
#on(notification, &block) ⇒ Object
2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 |
# File 'lib/fzeet/windows/scintilla.rb', line 2397 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 |