Module: Fzeet::ButtonMethods

Included in:
Button
Defined in:
lib/fzeet/windows/user/Control/Button.rb

Instance Method Summary collapse

Instance Method Details

#checked=(checked) ⇒ Object



69
# File 'lib/fzeet/windows/user/Control/Button.rb', line 69

def checked=(checked) sendmsg(:setcheck, (checked) ? Windows::BST_CHECKED : Windows::BST_UNCHECKED) end

#checked?Boolean

Returns:

  • (Boolean)


68
# File 'lib/fzeet/windows/user/Control/Button.rb', line 68

def checked?; sendmsg(:getcheck) == Windows::BST_CHECKED end

#image=(image) ⇒ Object



64
# File 'lib/fzeet/windows/user/Control/Button.rb', line 64

def image=(image) sendmsg(:setimage, Windows::IMAGE_BITMAP, image.handle) end

#indeterminate=(indeterminate) ⇒ Object



72
# File 'lib/fzeet/windows/user/Control/Button.rb', line 72

def indeterminate=(indeterminate) sendmsg(:setcheck, (indeterminate) ? Windows::BST_INDETERMINATE : Windows::BST_UNCHECKED) end

#indeterminate?Boolean

Returns:

  • (Boolean)


71
# File 'lib/fzeet/windows/user/Control/Button.rb', line 71

def indeterminate?; sendmsg(:getcheck) == Windows::BST_INDETERMINATE end

#note=(text) ⇒ Object



66
# File 'lib/fzeet/windows/user/Control/Button.rb', line 66

def note=(text) Windows.LPWSTR(text) { |p| sendmsg(:setnote, 0, p) } end

#pushed=(pushed) ⇒ Object



75
# File 'lib/fzeet/windows/user/Control/Button.rb', line 75

def pushed=(pushed) sendmsg(:setstate, (pushed) ? 1 : 0) end

#pushed?Boolean

Returns:

  • (Boolean)


74
# File 'lib/fzeet/windows/user/Control/Button.rb', line 74

def pushed?; (sendmsg(:getstate) & Windows::BST_PUSHED) == Windows::BST_PUSHED end