Module: Fzeet::ScintillaMethods
- Included in:
- Scintilla
- Defined in:
- lib/fzeet/windows/scintilla.rb
Instance Method Summary collapse
- #dirty=(dirty) ⇒ Object
- #dirty? ⇒ Boolean
- #font ⇒ Object
- #font=(name) ⇒ Object
- #fontSize ⇒ Object
- #fontSize=(size) ⇒ Object
- #tabWidth ⇒ Object
- #tabWidth=(tabWidth) ⇒ Object
- #text ⇒ Object
- #text=(text) ⇒ Object
Instance Method Details
#dirty=(dirty) ⇒ Object
2320 |
# File 'lib/fzeet/windows/scintilla.rb', line 2320 def dirty=(dirty) (dirty) ? @dirty = true : sendmsg(:setsavepoint) end |
#dirty? ⇒ Boolean
2319 |
# File 'lib/fzeet/windows/scintilla.rb', line 2319 def dirty?; @dirty end |
#font ⇒ Object
2297 2298 2299 2300 2301 2302 2303 |
# File 'lib/fzeet/windows/scintilla.rb', line 2297 def font FFI::MemoryPointer.new(:uchar, 33) { |p| sendmsg(:stylegetfont, Windows::STYLE_DEFAULT, p) return p.read_string } end |
#font=(name) ⇒ Object
2305 2306 2307 2308 2309 2310 2311 |
# File 'lib/fzeet/windows/scintilla.rb', line 2305 def font=(name) p = FFI::MemoryPointer.from_string(name) sendmsg(:stylesetfont, Windows::STYLE_DEFAULT, p) ensure p.free end |
#fontSize ⇒ Object
2313 |
# File 'lib/fzeet/windows/scintilla.rb', line 2313 def fontSize; sendmsg(:stylegetsize, Windows::STYLE_DEFAULT) end |
#fontSize=(size) ⇒ Object
2314 |
# File 'lib/fzeet/windows/scintilla.rb', line 2314 def fontSize=(size) sendmsg(:stylesetsize, Windows::STYLE_DEFAULT, size) end |
#tabWidth ⇒ Object
2316 |
# File 'lib/fzeet/windows/scintilla.rb', line 2316 def tabWidth; sendmsg(:gettabwidth) end |
#tabWidth=(tabWidth) ⇒ Object
2317 |
# File 'lib/fzeet/windows/scintilla.rb', line 2317 def tabWidth=(tabWidth) sendmsg(:settabwidth, tabWidth) end |
#text ⇒ Object
2281 2282 2283 2284 2285 2286 2287 |
# File 'lib/fzeet/windows/scintilla.rb', line 2281 def text FFI::MemoryPointer.new(:uchar, len = sendmsg(:gettextlength) + 1) { |p| sendmsg(:gettext, len, p) return p.read_string } end |
#text=(text) ⇒ Object
2289 2290 2291 2292 2293 2294 2295 |
# File 'lib/fzeet/windows/scintilla.rb', line 2289 def text=(text) p = FFI::MemoryPointer.from_string(text) sendmsg(:settext, 0, p) ensure p.free end |