class Metasm::Gui::WinWidget

Attributes

height[RW]
hwnd[RW]
parent[RW]
width[RW]
x[RW]
y[RW]

Public Class Methods

new() click to toggle source
# File metasm/gui/win32.rb, line 1426
def initialize
        @parent = nil
        @hwnd = nil
        @x = @y = @width = @height = 0
end

Public Instance Methods

focus?() click to toggle source
# File metasm/gui/win32.rb, line 1437
def focus?
        return true if not @parent
        (@parent.respond_to?(:focus?) ? @parent.focus? : true) and
        (@parent.respond_to?(:has_focus?) ? @parent.has_focus?(self) : true)
end
grab_focus() click to toggle source
# File metasm/gui/win32.rb, line 1432
def grab_focus
        return if not @parent
        @parent.set_focus(self) if @parent.respond_to? :set_focus
end
invalidate(x, y, w, h) click to toggle source
# File metasm/gui/win32.rb, line 1447
def invalidate(x, y, w, h)
        x += @x
        y += @y
        rect = Win32Gui.alloc_c_struct('RECT', :left => x, :right => x+w, :top => y, :bottom => y+h)
        Win32Gui.invalidaterect(@hwnd, rect, Win32Gui::FALSE)
end
redraw() click to toggle source
# File metasm/gui/win32.rb, line 1443
def redraw
        invalidate(0, 0, @width, @height)
end