Module: Fzeet::ScintillaMethods

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

Instance Method Summary collapse

Instance Method Details

#dirty=(dirty) ⇒ Object



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

def dirty=(dirty) (dirty) ? @dirty = true : sendmsg(:setsavepoint) end

#dirty?Boolean

Returns:

  • (Boolean)


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

def dirty?; @dirty end

#fontObject



2316
2317
2318
2319
2320
2321
2322
# File 'lib/fzeet/windows/scintilla.rb', line 2316

def font
	FFI::MemoryPointer.new(:uchar, 33) { |p|
		sendmsg(:stylegetfont, Windows::STYLE_DEFAULT, p)

		return p.read_string
	}
end

#font=(name) ⇒ Object



2324
2325
2326
2327
2328
2329
2330
# File 'lib/fzeet/windows/scintilla.rb', line 2324

def font=(name)
	p = FFI::MemoryPointer.from_string(name)

	sendmsg(:stylesetfont, Windows::STYLE_DEFAULT, p)
ensure
	p.free
end

#fontSizeObject



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

def fontSize; sendmsg(:stylegetsize, Windows::STYLE_DEFAULT) end

#fontSize=(size) ⇒ Object



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

def fontSize=(size) sendmsg(:stylesetsize, Windows::STYLE_DEFAULT, size) end

#tabWidthObject



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

def tabWidth; sendmsg(:gettabwidth) end

#tabWidth=(tabWidth) ⇒ Object



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

def tabWidth=(tabWidth) sendmsg(:settabwidth, tabWidth) end

#textObject



2300
2301
2302
2303
2304
2305
2306
# File 'lib/fzeet/windows/scintilla.rb', line 2300

def text
	FFI::MemoryPointer.new(:uchar, len = sendmsg(:gettextlength) + 1) { |p|
		sendmsg(:gettext, len, p)

		return p.read_string
	}
end

#text=(text) ⇒ Object



2308
2309
2310
2311
2312
2313
2314
# File 'lib/fzeet/windows/scintilla.rb', line 2308

def text=(text)
	p = FFI::MemoryPointer.from_string(text)

	sendmsg(:settext, 0, p)
ensure
	p.free
end