Class: Relisp::Window
- Defined in:
- lib/relisp/type_conversion/editing_types.rb
Overview
A proxy to an Emacs window
Instance Attribute Summary
Attributes inherited from Proxy
Instance Method Summary collapse
- #==(window2) ⇒ Object
- #alive? ⇒ Boolean
- #body_height ⇒ Object
- #buffer ⇒ Object
- #buffer=(new_buffer) ⇒ Object
- #dedicated ⇒ Object
- #dedicated=(flag) ⇒ Object
- #delete ⇒ Object
- #delete_others ⇒ Object
- #edges ⇒ Object
- #end ⇒ Object
- #enlarge(vertical, horizontal = 0) ⇒ Object
- #frame ⇒ Object
- #height ⇒ Object
- #hscroll ⇒ Object
- #hscroll=(columns) ⇒ Object
-
#initialize(*args) ⇒ Window
constructor
args must be of the form (symbol, slave = Relisp.default_slave).
- #inside_edges ⇒ Object
- #inside_pixel_edges ⇒ Object
- #pixel_edges ⇒ Object
- #point ⇒ Object
- #point=(position) ⇒ Object
- #recenter(count = nil) ⇒ Object
- #scroll_down(count = nil) ⇒ Object
- #scroll_left(count = nil) ⇒ Object
- #scroll_right(count = nil) ⇒ Object
- #scroll_up(count = nil) ⇒ Object
- #select ⇒ Object
- #shrink(vertical, horizontal = 0) ⇒ Object
- #split(size = nil, horizontal = false) ⇒ Object
- #split_horizontally(size = nil) ⇒ Object
- #split_vertically(size = nil) ⇒ Object
- #start ⇒ Object
- #start=(position) ⇒ Object
- #visible?(position) ⇒ Boolean
- #vscroll ⇒ Object
- #vscroll=(lines) ⇒ Object
- #vscroll_in_pixels ⇒ Object
- #vscroll_in_pixels=(pixels) ⇒ Object
- #width ⇒ Object
Methods inherited from Proxy
Constructor Details
#initialize(*args) ⇒ Window
args must be of the form (symbol, slave = Relisp.default_slave)
The symbol argument is considered to be the name of a pre-existing window in the slave process.
307 308 309 310 311 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 307 def initialize(*args) super do raise ArgumentError, "Cannot create Window using 'new' method." end end |
Instance Method Details
#==(window2) ⇒ Object
479 480 481 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 479 def ==(window2) @slave.elisp_eval "(equal #{to_elisp} #{window2.to_elisp})" end |
#alive? ⇒ Boolean
336 337 338 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 336 def alive? call_on_self :window_live_p end |
#body_height ⇒ Object
441 442 443 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 441 def body_height call_on_self :window_body_height end |
#buffer ⇒ Object
352 353 354 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 352 def buffer call_on_self :window_buffer end |
#buffer=(new_buffer) ⇒ Object
356 357 358 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 356 def buffer=(new_buffer) call_on_self :set_window_buffer, new_buffer end |
#dedicated ⇒ Object
360 361 362 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 360 def dedicated call_on_self :window_dedicated_p end |
#dedicated=(flag) ⇒ Object
364 365 366 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 364 def dedicated=(flag) call_on_self :set_window_dedicated_p, flag end |
#delete ⇒ Object
340 341 342 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 340 def delete call_on_self :delete_window end |
#delete_others ⇒ Object
344 345 346 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 344 def delete_others call_on_self :delete_other_windows end |
#edges ⇒ Object
449 450 451 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 449 def edges (call_on_self :window_edges).to_list end |
#end ⇒ Object
385 386 387 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 385 def end call_on_self :window_end end |
#enlarge(vertical, horizontal = 0) ⇒ Object
465 466 467 468 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 465 def enlarge(vertical, horizontal=0) eval_in_window "(enlarge-window #{vertical.to_elisp})" eval_in_window "(enlarge-window-horizontally #{horizontal.to_elisp})" end |
#frame ⇒ Object
475 476 477 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 475 def frame call_on_self :window_frame end |
#height ⇒ Object
437 438 439 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 437 def height call_on_self :window_height end |
#hscroll ⇒ Object
429 430 431 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 429 def hscroll call_on_self :window_hscroll end |
#hscroll=(columns) ⇒ Object
433 434 435 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 433 def hscroll=(columns) call_on_self :set_window_hscroll, columns end |
#inside_edges ⇒ Object
453 454 455 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 453 def inside_edges (call_on_self :window_inside_edges).to_list end |
#inside_pixel_edges ⇒ Object
461 462 463 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 461 def inside_pixel_edges (call_on_self :window_inside_pixel_edges).to_list end |
#pixel_edges ⇒ Object
457 458 459 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 457 def pixel_edges (call_on_self :window_pixel_edges).to_list end |
#point ⇒ Object
368 369 370 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 368 def point call_on_self :window_point end |
#point=(position) ⇒ Object
372 373 374 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 372 def point=(position) call_on_self :set_window_point, position end |
#recenter(count = nil) ⇒ Object
401 402 403 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 401 def recenter(count=nil) eval_in_window "(recenter #{count.to_elisp})" end |
#scroll_down(count = nil) ⇒ Object
397 398 399 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 397 def scroll_down(count=nil) eval_in_window "(scroll-down #{count.to_elisp})" end |
#scroll_left(count = nil) ⇒ Object
421 422 423 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 421 def scroll_left(count=nil) eval_in_window "(scroll-left #{count.to_elisp})" end |
#scroll_right(count = nil) ⇒ Object
425 426 427 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 425 def scroll_right(count=nil) eval_in_window "(scroll-right #{count.to_elisp})" end |
#scroll_up(count = nil) ⇒ Object
393 394 395 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 393 def scroll_up(count=nil) eval_in_window "(scroll-up #{count.to_elisp})" end |
#select ⇒ Object
348 349 350 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 348 def select call_on_self :select_window end |
#shrink(vertical, horizontal = 0) ⇒ Object
470 471 472 473 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 470 def shrink(vertical, horizontal=0) eval_in_window "(shrink-window #{vertical.to_elisp})" eval_in_window "(shrink-window-horizontally #{horizontal.to_elisp})" end |
#split(size = nil, horizontal = false) ⇒ Object
324 325 326 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 324 def split(size=nil, horizontal=false) call_on_self :split_window, size, horizontal end |
#split_horizontally(size = nil) ⇒ Object
328 329 330 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 328 def split_horizontally(size=nil) split(size, true) end |
#split_vertically(size = nil) ⇒ Object
332 333 334 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 332 def split_vertically(size=nil) split(size, false) end |
#start ⇒ Object
376 377 378 379 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 376 def start # eval_in_window "(window-start)" call_on_self :window_start end |
#start=(position) ⇒ Object
381 382 383 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 381 def start=(position) call_on_self :set_window_start, position end |
#visible?(position) ⇒ Boolean
389 390 391 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 389 def visible?(position) @slave.elisp_eval( "(pos-visible-in-window-p #{position.to_elisp} #{@elisp_variable})" ) end |
#vscroll ⇒ Object
405 406 407 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 405 def vscroll call_on_self :window_vscroll end |
#vscroll=(lines) ⇒ Object
413 414 415 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 413 def vscroll=(lines) call_on_self :set_window_vscroll, lines end |
#vscroll_in_pixels ⇒ Object
409 410 411 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 409 def vscroll_in_pixels call_on_self :window_vscroll, true end |
#vscroll_in_pixels=(pixels) ⇒ Object
417 418 419 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 417 def vscroll_in_pixels=(pixels) call_on_self :set_window_vscroll, pixels, true end |
#width ⇒ Object
445 446 447 |
# File 'lib/relisp/type_conversion/editing_types.rb', line 445 def width call_on_self :window_width end |