class Fzeet::Scintilla

Constants

Prefix

Public Class Methods

crackNotification(args) click to toggle source
# 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
new(parent, id, opts = {}, &block) click to toggle source
Calls superclass method
# 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

Public Instance Methods

on(notification, &block) click to toggle source
# 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