Class: Relisp::Frame

Inherits:
Proxy show all
Defined in:
lib/relisp/type_conversion/editing_types.rb

Overview

A proxy to an Emacs frame

Instance Attribute Summary

Attributes inherited from Proxy

#elisp_variable, #slave

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Proxy

elisp_alias, from_elisp, #makunbound, #to_elisp

Constructor Details

#initialize(*args) ⇒ Frame

args can be any of these forms:

  • (symbol, slave = Relisp.default_slave)

  • (option_hash = {}, slave = Relisp.default_slave)

  • (slave = Relisp.default_slave)

When a symbol is given it is considered to be the name of a pre-existing frame in the slave process. Otherwise a new frame is created using any options in (new-frame).

The option_hash can specify the following

:name => string

The frame should be named string.

:width => fixnum

The frame should be fixnum characters in width.

:height => fixnum

The frame should be fixnum text lines high.

You cannot specify either :width or :height, you must use neither or both.

:minibuffer => true

The frame should have a minibuffer.

:minibuffer => nil

The frame should have no minibuffer.

:minibuffer => :only

The frame should contain only a minibuffer.

:minibuffer => window

The frame should use window as its minibuffer window.

:"window-system" => nil

The frame should be displayed on a terminal device.

:"window-system" => :x

The frame should be displayed in an X window.

:terminal => id

The frame should use the terminal identified by id.



490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/relisp/type_conversion/editing_types.rb', line 490

def initialize(*args)
  super do |sargs|
    hash = sargs[0]
    alist = ""
    if hash && hash.size > 1
      alist << "'("
      hash.each_pair do |key, val|
        val = if val.kind_of?(Symbol)
                val.value.to_elisp
              else
                val.to_elisp
              end
        alist << "(#{key} . #{val.to_s}) "
      end
      alist << ")"
    end

    @slave.elisp_exec( "(setq #{@elisp_variable} (make-frame #{alist}))" )
  end
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Relisp::Proxy

Class Method Details

.param_reader(name) ⇒ Object

begin frame parameters



561
562
563
564
565
566
567
# File 'lib/relisp/type_conversion/editing_types.rb', line 561

def self.param_reader name
  class_eval <<-EOM
  def #{name}
      get_parameter :#{name}
    end
  EOM
end

.param_writer(name) ⇒ Object



569
570
571
572
573
574
575
# File 'lib/relisp/type_conversion/editing_types.rb', line 569

def self.param_writer name
  class_eval <<-EOM
  def #{name}=(new_value)
      set_parameter :#{name}, new_value
    end
  EOM
end

Instance Method Details

#auto_lowerObject

:method: auto_lower= :call-seq:

auto_lower=(new_value)


785
# File 'lib/relisp/type_conversion/editing_types.rb', line 785

param_writer :auto_lower

#auto_raiseObject

:method: auto_raise= :call-seq:

auto_raise=(new_value)


776
# File 'lib/relisp/type_conversion/editing_types.rb', line 776

param_writer :auto_raise

#background_colorObject

:method: background_color= :call-seq:

background_color=(new_value)


893
# File 'lib/relisp/type_conversion/editing_types.rb', line 893

param_writer :background_color

#background_modeObject

:method: background_mode= :call-seq:

background_mode=(new_value)


848
# File 'lib/relisp/type_conversion/editing_types.rb', line 848

param_writer :background_mode

#border_colorObject

:method: border_color= :call-seq:

border_color=(new_value)


920
# File 'lib/relisp/type_conversion/editing_types.rb', line 920

param_writer :border_color

#border_widthObject

:method: border_width= :call-seq:

border_width=(new_value)


668
# File 'lib/relisp/type_conversion/editing_types.rb', line 668

param_writer :border_width

#cursor_colorObject

:method: cursor_color= :call-seq:

cursor_color=(new_value)


911
# File 'lib/relisp/type_conversion/editing_types.rb', line 911

param_writer :cursor_color

#cursor_typeObject

:method: cursor_type= :call-seq:

cursor_type=(new_value)


839
# File 'lib/relisp/type_conversion/editing_types.rb', line 839

param_writer :cursor_type

#displayObject

:method: display= :call-seq:

display=(new_value)


587
# File 'lib/relisp/type_conversion/editing_types.rb', line 587

param_writer :display

#display_typeObject

:method: display_type= :call-seq:

display_type=(new_value)


596
# File 'lib/relisp/type_conversion/editing_types.rb', line 596

param_writer :display_type

#fontObject

:method: font= :call-seq:

font=(new_value)


875
# File 'lib/relisp/type_conversion/editing_types.rb', line 875

param_writer :font

#foreground_colorObject

:method: foreground_color= :call-seq:

foreground_color=(new_value)


884
# File 'lib/relisp/type_conversion/editing_types.rb', line 884

param_writer :foreground_color

#fullscreenObject

:method: fullscreen= :call-seq:

fullscreen=(new_value)


659
# File 'lib/relisp/type_conversion/editing_types.rb', line 659

param_writer :fullscreen

#heightObject

:method: height= :call-seq:

height=(new_value)


641
# File 'lib/relisp/type_conversion/editing_types.rb', line 641

param_writer :height

#icon_nameObject

:method: icon_name= :call-seq:

icon_name=(new_value)


803
# File 'lib/relisp/type_conversion/editing_types.rb', line 803

param_writer :icon_name

#icon_typeObject

:method: icon_type= :call-seq:

icon_type=(new_value)


794
# File 'lib/relisp/type_conversion/editing_types.rb', line 794

param_writer :icon_type

#internal_border_widthObject

:method: internal_border_width= :call-seq:

internal_border_width=(new_value)


677
# File 'lib/relisp/type_conversion/editing_types.rb', line 677

param_writer :internal_border_width

#leftObject

:method: left= :call-seq:

left=(new_value)


623
# File 'lib/relisp/type_conversion/editing_types.rb', line 623

param_writer :left

#left_fringeObject

:method: left_fringe= :call-seq:

left_fringe=(new_value)


704
# File 'lib/relisp/type_conversion/editing_types.rb', line 704

param_writer :left_fringe

#line_spacingObject

:method: line_spacing= :call-seq:

line_spacing=(new_value)


740
# File 'lib/relisp/type_conversion/editing_types.rb', line 740

param_writer :line_spacing

:method: menu_bar_lines= :call-seq:

menu_bar_lines=(new_value)


722
# File 'lib/relisp/type_conversion/editing_types.rb', line 722

param_writer :menu_bar_lines

#minibufferObject

:method: minibuffer= :call-seq:

minibuffer=(new_value)


749
# File 'lib/relisp/type_conversion/editing_types.rb', line 749

param_writer :minibuffer

#mouse_colorObject

:method: mouse_color= :call-seq:

mouse_color=(new_value)


902
# File 'lib/relisp/type_conversion/editing_types.rb', line 902

param_writer :mouse_color

#nameObject

:method: name= :call-seq:

name=(new_value)


614
# File 'lib/relisp/type_conversion/editing_types.rb', line 614

param_writer :name

#outer_window_idObject

:method: outer_window_id= :call-seq:

outer_window_id=(new_value)


821
# File 'lib/relisp/type_conversion/editing_types.rb', line 821

param_writer :outer_window_id

#right_fringeObject

:method: right_fringe= :call-seq:

right_fringe=(new_value)


713
# File 'lib/relisp/type_conversion/editing_types.rb', line 713

param_writer :right_fringe

#screen_gammaObject

:method: screen_gamma= :call-seq:

screen_gamma=(new_value)


866
# File 'lib/relisp/type_conversion/editing_types.rb', line 866

param_writer :screen_gamma

#scroll_bar_backgroundObject

:method: scroll_bar_background= :call-seq:

scroll_bar_background=(new_value)


938
# File 'lib/relisp/type_conversion/editing_types.rb', line 938

param_writer :scroll_bar_background

#scroll_bar_foregroundObject

:method: scroll_bar_foreground= :call-seq:

scroll_bar_foreground=(new_value)


929
# File 'lib/relisp/type_conversion/editing_types.rb', line 929

param_writer :scroll_bar_foreground

#scroll_bar_widthObject

:method: scroll_bar_width= :call-seq:

scroll_bar_width=(new_value)


695
# File 'lib/relisp/type_conversion/editing_types.rb', line 695

param_writer :scroll_bar_width

#titleObject

:method: title= :call-seq:

title=(new_value)


605
# File 'lib/relisp/type_conversion/editing_types.rb', line 605

param_writer :title

#tool_bar_linesObject

:method: tool_bar_lines= :call-seq:

tool_bar_lines=(new_value)


731
# File 'lib/relisp/type_conversion/editing_types.rb', line 731

param_writer :tool_bar_lines

#topObject

:method: top= :call-seq:

top=(new_value)


632
# File 'lib/relisp/type_conversion/editing_types.rb', line 632

param_writer :top

#tty_color_modeObject

:method: tty_color_mode= :call-seq:

tty_color_mode=(new_value)


857
# File 'lib/relisp/type_conversion/editing_types.rb', line 857

param_writer :tty_color_mode

#unsplittableObject

:method: unsplittable= :call-seq:

unsplittable=(new_value)


758
# File 'lib/relisp/type_conversion/editing_types.rb', line 758

param_writer :unsplittable

#vertical_scroll_barsObject

:method: vertical_scroll_bars= :call-seq:

vertical_scroll_bars=(new_value)


686
# File 'lib/relisp/type_conversion/editing_types.rb', line 686

param_writer :vertical_scroll_bars

#visibilityObject

:method: visibility= :call-seq:

visibility=(new_value)


767
# File 'lib/relisp/type_conversion/editing_types.rb', line 767

param_writer :visibility

#wait_for_wmObject

:method: wait_for_wm= :call-seq:

wait_for_wm=(new_value)


830
# File 'lib/relisp/type_conversion/editing_types.rb', line 830

param_writer :wait_for_wm

#widthObject

:method: width= :call-seq:

width=(new_value)


650
# File 'lib/relisp/type_conversion/editing_types.rb', line 650

param_writer :width

#window_idObject

:method: window_id= :call-seq:

window_id=(new_value)


812
# File 'lib/relisp/type_conversion/editing_types.rb', line 812

param_writer :window_id