Module: Fzeet::ScintillaMethods

Included in:
Scintilla
Defined in:
lib/fzeet/windows/scintilla.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


2319
# File 'lib/fzeet/windows/scintilla.rb', line 2319

def dirty?; @dirty end

#fontObject



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

#fontSizeObject



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

#tabWidthObject



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

#textObject



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