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

Instance Method Summary collapse

Methods inherited from Proxy

from_elisp, #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.



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
# File 'lib/relisp/type_conversion/editing_types.rb', line 524

def initialize(*args)
  super do |args|
    hash = args[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

Instance Method Details

#alive?Boolean

Returns:

  • (Boolean)


549
550
551
# File 'lib/relisp/type_conversion/editing_types.rb', line 549

def alive?
  call_on_self :frame_live_p
end

#auto_lowerObject



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

def auto_lower
  get_parameter :auto_lower
end

#auto_lower=(new_value) ⇒ Object



789
790
791
# File 'lib/relisp/type_conversion/editing_types.rb', line 789

def auto_lower=(new_value)
  set_parameter :auto_lower, new_value
end

#auto_raiseObject



777
778
779
# File 'lib/relisp/type_conversion/editing_types.rb', line 777

def auto_raise
  get_parameter :auto_raise
end

#auto_raise=(new_value) ⇒ Object



781
782
783
# File 'lib/relisp/type_conversion/editing_types.rb', line 781

def auto_raise=(new_value)
  set_parameter :auto_raise, new_value
end

#background_colorObject



881
882
883
# File 'lib/relisp/type_conversion/editing_types.rb', line 881

def background_color
  get_parameter :background_color
end

#background_color=(new_value) ⇒ Object



885
886
887
# File 'lib/relisp/type_conversion/editing_types.rb', line 885

def background_color=(new_value)
  set_parameter :background_color, new_value
end

#background_modeObject



841
842
843
# File 'lib/relisp/type_conversion/editing_types.rb', line 841

def background_mode
  get_parameter :background_mode
end

#background_mode=(new_value) ⇒ Object



845
846
847
# File 'lib/relisp/type_conversion/editing_types.rb', line 845

def background_mode=(new_value)
  set_parameter :background_mode, new_value
end

#border_colorObject



905
906
907
# File 'lib/relisp/type_conversion/editing_types.rb', line 905

def border_color
  get_parameter :border_color
end

#border_color=(new_value) ⇒ Object



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

def border_color=(new_value)
  set_parameter :border_color, new_value
end

#border_widthObject



681
682
683
# File 'lib/relisp/type_conversion/editing_types.rb', line 681

def border_width
  get_parameter :border_width
end

#border_width=(new_value) ⇒ Object



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

def border_width=(new_value)
  set_parameter :border_width, new_value
end

#cursor_colorObject



897
898
899
# File 'lib/relisp/type_conversion/editing_types.rb', line 897

def cursor_color
  get_parameter :cursor_color
end

#cursor_color=(new_value) ⇒ Object



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

def cursor_color=(new_value)
  set_parameter :cursor_color, new_value
end

#cursor_typeObject



833
834
835
# File 'lib/relisp/type_conversion/editing_types.rb', line 833

def cursor_type
  get_parameter :cursor_type
end

#cursor_type=(new_value) ⇒ Object



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

def cursor_type=(new_value)
  set_parameter :cursor_type, new_value
end

#deleteObject



545
546
547
# File 'lib/relisp/type_conversion/editing_types.rb', line 545

def delete
  call_on_self :delete_frame
end

#displayObject



609
610
611
# File 'lib/relisp/type_conversion/editing_types.rb', line 609

def display
  get_parameter :display
end

#display=(new_value) ⇒ Object



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

def display=(new_value)
  set_parameter :display, new_value
end

#display_typeObject



617
618
619
# File 'lib/relisp/type_conversion/editing_types.rb', line 617

def display_type
  get_parameter :display_type
end

#display_type=(new_value) ⇒ Object



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

def display_type=(new_value)
  set_parameter :display_type, new_value
end

#focusObject



561
562
563
# File 'lib/relisp/type_conversion/editing_types.rb', line 561

def focus
  call_on_self :select_frame_set_input_focus
end

#fontObject



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

def font
  get_parameter :font
end

#font=(new_value) ⇒ Object



869
870
871
# File 'lib/relisp/type_conversion/editing_types.rb', line 869

def font=(new_value)
  set_parameter :font, new_value
end

#foreground_colorObject



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

def foreground_color
  get_parameter :foreground_color
end

#foreground_color=(new_value) ⇒ Object



877
878
879
# File 'lib/relisp/type_conversion/editing_types.rb', line 877

def foreground_color=(new_value)
  set_parameter :foreground_color, new_value
end

#fullscreenObject



673
674
675
# File 'lib/relisp/type_conversion/editing_types.rb', line 673

def fullscreen
  get_parameter :fullscreen
end

#fullscreen=(new_value) ⇒ Object



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

def fullscreen=(new_value)
  set_parameter :fullscreen, new_value
end

#heightObject



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

def height
  get_parameter :height
end

#height=(new_value) ⇒ Object



661
662
663
# File 'lib/relisp/type_conversion/editing_types.rb', line 661

def height=(new_value)
  set_parameter :height, new_value
end

#hideObject



577
578
579
# File 'lib/relisp/type_conversion/editing_types.rb', line 577

def hide
  call_on_self :make_frame_invisible
end

#icon_nameObject



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

def icon_name
  get_parameter :icon_name
end

#icon_name=(new_value) ⇒ Object



805
806
807
# File 'lib/relisp/type_conversion/editing_types.rb', line 805

def icon_name=(new_value)
  set_parameter :icon_name, new_value
end

#icon_typeObject



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

def icon_type
  get_parameter :icon_type
end

#icon_type=(new_value) ⇒ Object



797
798
799
# File 'lib/relisp/type_conversion/editing_types.rb', line 797

def icon_type=(new_value)
  set_parameter :icon_type, new_value
end

#iconifyObject



581
582
583
# File 'lib/relisp/type_conversion/editing_types.rb', line 581

def iconify
  call_on_self :inconify_frame
end

#internal_border_widthObject



689
690
691
# File 'lib/relisp/type_conversion/editing_types.rb', line 689

def internal_border_width
  get_parameter :internal_border_width
end

#internal_border_width=(new_value) ⇒ Object



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

def internal_border_width=(new_value)
  set_parameter :internal_border_width, new_value
end

#leftObject



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

def left
  get_parameter :left
end

#left=(new_value) ⇒ Object



645
646
647
# File 'lib/relisp/type_conversion/editing_types.rb', line 645

def left=(new_value)
  set_parameter :left, new_value
end

#left_fringeObject



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

def left_fringe
  get_parameter :left_fringe
end

#left_fringe=(new_value) ⇒ Object



717
718
719
# File 'lib/relisp/type_conversion/editing_types.rb', line 717

def left_fringe=(new_value)
  set_parameter :left_fringe, new_value
end

#line_spacingObject



745
746
747
# File 'lib/relisp/type_conversion/editing_types.rb', line 745

def line_spacing
  get_parameter :line_spacing
end

#line_spacing=(new_value) ⇒ Object



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

def line_spacing=(new_value)
  set_parameter :line_spacing, new_value
end

#lowerObject



589
590
591
# File 'lib/relisp/type_conversion/editing_types.rb', line 589

def lower
  call_on_self :lower_frame
end


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

def menu_bar_lines
  get_parameter :menu_bar_lines
end


733
734
735
# File 'lib/relisp/type_conversion/editing_types.rb', line 733

def menu_bar_lines=(new_value)
  set_parameter :menu_bar_lines, new_value
end

#minibufferObject



753
754
755
# File 'lib/relisp/type_conversion/editing_types.rb', line 753

def minibuffer
  get_parameter :minibuffer
end

#minibuffer=(new_value) ⇒ Object



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

def minibuffer=(new_value)
  set_parameter :minibuffer, new_value
end

#mouse_colorObject



889
890
891
# File 'lib/relisp/type_conversion/editing_types.rb', line 889

def mouse_color
  get_parameter :mouse_color
end

#mouse_color=(new_value) ⇒ Object



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

def mouse_color=(new_value)
  set_parameter :mouse_color, new_value
end

#nameObject



633
634
635
# File 'lib/relisp/type_conversion/editing_types.rb', line 633

def name
  get_parameter :name, new_value
end

#name=(new_value) ⇒ Object



637
638
639
# File 'lib/relisp/type_conversion/editing_types.rb', line 637

def name=(new_value)
  set_parameter :name, new_value
end

#outer_window_idObject



817
818
819
# File 'lib/relisp/type_conversion/editing_types.rb', line 817

def outer_window_id
  get_parameter :outer_window_id
end

#outer_window_id=(new_value) ⇒ Object



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

def outer_window_id=(new_value)
  set_parameter :outer_window_id, new_value
end

#raiseObject



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

def raise
  call_on_self :raise_frame
end

#right_fringeObject



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

def right_fringe
  get_parameter :right_fringe
end

#right_fringe=(new_value) ⇒ Object



725
726
727
# File 'lib/relisp/type_conversion/editing_types.rb', line 725

def right_fringe=(new_value)
  set_parameter :right_fringe, new_value
end

#screen_gammaObject



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

def screen_gamma
  get_parameter :screen_gamma
end

#screen_gamma=(new_value) ⇒ Object



861
862
863
# File 'lib/relisp/type_conversion/editing_types.rb', line 861

def screen_gamma=(new_value)
  set_parameter :screen_gamma, new_value
end

#scroll_bar_backgroundObject



921
922
923
# File 'lib/relisp/type_conversion/editing_types.rb', line 921

def scroll_bar_background
  get_parameter :scroll_bar_background
end

#scroll_bar_background=(new_value) ⇒ Object



925
926
927
# File 'lib/relisp/type_conversion/editing_types.rb', line 925

def scroll_bar_background=(new_value)
  set_parameter :scroll_bar_background, new_value
end

#scroll_bar_foregroundObject



913
914
915
# File 'lib/relisp/type_conversion/editing_types.rb', line 913

def scroll_bar_foreground
  get_parameter :scroll_bar_foreground
end

#scroll_bar_foreground=(new_value) ⇒ Object



917
918
919
# File 'lib/relisp/type_conversion/editing_types.rb', line 917

def scroll_bar_foreground=(new_value)
  set_parameter :scroll_bar_foreground, new_value
end

#scroll_bar_widthObject



705
706
707
# File 'lib/relisp/type_conversion/editing_types.rb', line 705

def scroll_bar_width
  get_parameter :scroll_bar_width
end

#scroll_bar_width=(new_value) ⇒ Object



709
710
711
# File 'lib/relisp/type_conversion/editing_types.rb', line 709

def scroll_bar_width=(new_value)
  set_parameter :scroll_bar_width, new_value
end

#selectObject



565
566
567
# File 'lib/relisp/type_conversion/editing_types.rb', line 565

def select
  call_on_self :select_frame
end

#selected_windowObject



553
554
555
# File 'lib/relisp/type_conversion/editing_types.rb', line 553

def selected_window
  call_on_self :frame_selected_window
end

#selected_window=(window) ⇒ Object



557
558
559
# File 'lib/relisp/type_conversion/editing_types.rb', line 557

def selected_window=(window)
  call_on_self :set_frame_selected_window, window
end

#showObject



573
574
575
# File 'lib/relisp/type_conversion/editing_types.rb', line 573

def show
  call_on_self :make_frame_visible
end

#titleObject



625
626
627
# File 'lib/relisp/type_conversion/editing_types.rb', line 625

def title
  get_parameter :title
end

#title=(new_value) ⇒ Object



629
630
631
# File 'lib/relisp/type_conversion/editing_types.rb', line 629

def title=(new_value)
  set_parameter :title, new_value
end

#tool_bar_linesObject



737
738
739
# File 'lib/relisp/type_conversion/editing_types.rb', line 737

def tool_bar_lines
  get_parameter :tool_bar_lines
end

#tool_bar_lines=(new_value) ⇒ Object



741
742
743
# File 'lib/relisp/type_conversion/editing_types.rb', line 741

def tool_bar_lines=(new_value)
  set_parameter :tool_bar_lines, new_value
end

#topObject



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

def top
  get_parameter :top
end

#top=(new_value) ⇒ Object



653
654
655
# File 'lib/relisp/type_conversion/editing_types.rb', line 653

def top=(new_value)
  set_parameter :top, new_value
end

#tty_color_modeObject



849
850
851
# File 'lib/relisp/type_conversion/editing_types.rb', line 849

def tty_color_mode
  get_parameter :tty_color_mode
end

#tty_color_mode=(new_value) ⇒ Object



853
854
855
# File 'lib/relisp/type_conversion/editing_types.rb', line 853

def tty_color_mode=(new_value)
  set_parameter :tty_color_mode, new_value
end

#unsplittableObject



761
762
763
# File 'lib/relisp/type_conversion/editing_types.rb', line 761

def unsplittable
  get_parameter :unsplittable
end

#unsplittable=(new_value) ⇒ Object



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

def unsplittable=(new_value)
  set_parameter :unsplittable, new_value
end

#vertical_scroll_barsObject



697
698
699
# File 'lib/relisp/type_conversion/editing_types.rb', line 697

def vertical_scroll_bars
  get_parameter :vertical_scroll_bars
end

#vertical_scroll_bars=(new_value) ⇒ Object



701
702
703
# File 'lib/relisp/type_conversion/editing_types.rb', line 701

def vertical_scroll_bars=(new_value)
  set_parameter :vertical_scroll_bars, new_value
end

#visibilityObject



769
770
771
# File 'lib/relisp/type_conversion/editing_types.rb', line 769

def visibility
  get_parameter :visibility
end

#visibility=(new_value) ⇒ Object



773
774
775
# File 'lib/relisp/type_conversion/editing_types.rb', line 773

def visibility=(new_value)
  set_parameter :visibility, new_value
end

#visible?Boolean

Returns:

  • (Boolean)


569
570
571
# File 'lib/relisp/type_conversion/editing_types.rb', line 569

def visible?
  call_on_self :frame_visible_p
end

#wait_for_wmObject



825
826
827
# File 'lib/relisp/type_conversion/editing_types.rb', line 825

def wait_for_wm
  get_parameter :wait_for_wm
end

#wait_for_wm=(new_value) ⇒ Object



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

def wait_for_wm=(new_value)
  set_parameter :wait_for_wm, new_value
end

#widthObject



665
666
667
# File 'lib/relisp/type_conversion/editing_types.rb', line 665

def width
  get_parameter :width
end

#width=(new_value) ⇒ Object



669
670
671
# File 'lib/relisp/type_conversion/editing_types.rb', line 669

def width=(new_value)
  set_parameter :width, new_value
end

#window_idObject



809
810
811
# File 'lib/relisp/type_conversion/editing_types.rb', line 809

def window_id
  get_parameter :window_id
end

#window_id=(new_value) ⇒ Object



813
814
815
# File 'lib/relisp/type_conversion/editing_types.rb', line 813

def window_id=(new_value)
  set_parameter :window_id, new_value
end