[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::Entry

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 4月 3日 (土) 02:29:52 JST


-------------------------
REMOTE_ADDR = 218.231.161.247
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/en/?Gtk%3A%3AEntry
-------------------------
  = class Gtk::Entry
  The Gtk::Entry widget is a single line text entry widget. A fairly large set of key bindings are supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible. 
  
  == Object Hierarchy
  * Object
    * GLib::Instantiatable
      * GLib::Object
        * Gtk::Object
          * Gtk::Widget
            * Gtk::Entry
  
  == Included Modules
  * Gtk::Editable
  * Gtk::CellEditable
  
  == Class Methods
  --- Gtk::Entry.new
      Creates a new Gtk::Entry widget. 
      * Returns: a new Gtk::Entry.  
  
  == Instance Methods
  --- activates_default?
      Retrieves the value set by Gtk::Entry#activates_default=.
      * Returns: true if the entry will activate the default widget.  
  
  --- activates_default=(setting)
      If setting is true, pressing Enter in the entry will activate the default widget for the window containing the entry. This usually means that the dialog box containing the entry will be closed, since the default widget is usually one of the dialog buttons. 
      (For experts: if setting is true, the entry calls Gtk::Window#activate_default on the window containing the entry, in the default handler for the "activate" signal.)
      * setting: true to activate window's default widget on Enter keypress 
      * Returns: setting.
  
  --- set_activates_default(setting)
      Same as activates_default=.
      * setting: true to activate window's default widget on Enter keypress 
      * Returns: self.
  
  --- cursor_position
      Retrieves the current cursor position. See Gtk::Editable#position.
  
  --- editable?
      Retrieves if the user can edit the text in the editable widget or not. See Gtk::Editable#editable?.
      * Returns: true if the user can edit the text, othewise false.
  
  --- editable=(editable)
      Determines if the user can edit the text in the editable widget or not. 
      * editable: true if the user can edit the text, othewise false.
      * Returns: editable
  
  --- set_editable(editable)
      Same as editable=.
      * editable: true if the user can edit the text, othewise false.
      * Returns: self
  
  --- has_frame?
      Gets the value set by Gtk::Entry#has_frame=.
      * Returns: whether the entry has a beveled frame
  
  --- has_frame=(setting)
      Sets whether the entry has a beveled frame around it.
      * setting: new value
      * Returns: setting
  
  --- set_has_frame(setting)
      Same as has_frame=.
      * setting: new value
      * Returns: setting
  
  --- invisible_char
      Retrieves the character displayed in place of the real characters for entries with visisbility set to false. See Gtk::Entry#invisible_char=.
      * Returns: the current invisible char, or 0, if the entry does not show invisible text at all.  
  
  --- invisible_char=(ch)
      Sets the character to use in place of the actual text when Gtk::Entry#visibility= has been called to set text visibility to false. i.e. this is the character used in "password mode" to show the user how many characters have been typed. The default invisible char is an asterisk ('*'). If you set the invisible char to 0, then the user will get no feedback at all; there will be no text on the screen as they type.
      * ch: a Unicode character(Number)
      * Returns: ch
  
  --- set_invisible_char(ch)
      Same as invisible_char=
      * ch: a Unicode character(Number)
      * Returns: self
  
  --- layout
      Gets the Pango::Layout used to display the entry. The layout is useful to e.g. convert text positions to pixel positions, in combination with Gtk::Entry#layout_offsets. The returned layout is owned by the entry so need not be freed by the caller. 
      * Returns: the Pango::Layout for this entry
  
  --- layout_offsets
      Obtains the position of the Pango::Layout used to render text in the entry, in widget coordinates. Useful if you want to line up the text in an entry with some other text, e.g. when using the entry to implement editable cells in a sheet widget. 
      Also useful to convert mouse events into coordinates inside the Pango::Layout, e.g. to take some action if some part of the entry text is clicked. 
      Note that as the user scrolls around in the entry the offsets will change; you'll need to connect to the "notify::scroll_offset" signal to track this. Remember when using the Pango::Layout methods you need to convert to and from pixels using Pango#pixels() or Pango::SCALE. 
      * Returns: [x, y] 
                * x: location to store X offset of layout, or nil
                * y: location to store Y offset of layout, or nil
  
  --- max_length
      Retrieves the maximum allowed length of the text in entry. See Gtk::Entry#max_length=.
      * Returns: the maximum allowed number of characters in Gtk::Entry, or 0 if there is no maximum.  
  --- max_length=(length)
      Sets the maximum allowed length of the contents of the widget. If the current contents are longer than the given length, then they will be truncated to fit.
      * length: the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536. 
      * Returns: length
  
  --- set_max_length(length)
      Same as max_length=.
      * length: the maximum length of the entry, or 0 for no maximum. (other than the maximum length of entries.) The value passed in will be clamped to the range 0-65536. 
      * Returns: self
  
  --- scroll_offset
      Retrieves the number of pixels of the entry scrolled off the screen to the left.
      * Returns: the offset value.
  
  --- selection_bound
      Retrieves the position of the opposite end of the selection from the cursor in chars.
      * Returns: the position.
  
  --- text
      Retrieves the contents of the entry.
      * Returns: the contents of the entry.
  --- text=(text)
      Sets the contents of the entry.
      * text: the contents of the entry.
      * Returns: text
  
  --- set_text(text)
      Same as text=.
      * text: the contents of the entry.
      * Returns: self
  
  --- visibility?
      Retrieves whether the text in entry is visible. See Gtk::Entry#visibility=.
      * Returns: true if the text is currently visible
  
  --- visibility=(visible)
      Sets whether the contents of the entry are visible or not. When visibility is set to false, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere. 
      The default invisible char is the asterisk '*', but it can be changed with Gtk::Entry#invisible_char=. 
      * visible: true if the contents of the entry are displayed as plaintext.  
      * Returns: visible
  
  --- set_visibility(visible)
      Same as visibility=.
      * visible: true if the contents of the entry are displayed as plaintext.  
      * Returns: self
  
  --- width_chars
      Gets the value set by Gtk::Entry#width_chars=.
      * Returns: number of chars to request space for, or negative if unset  
  
  --- width_chars=(n_chars)
      Changes the size request of the entry to be about the right size for n_chars characters. Note that it changes the size request, the size can still be affected by how you pack the widget into containers. If n_chars is -1, the size reverts to the default entry size.
      * n_chars : width in chars  
      * Returns: n_chars
  
  --- set_width_chars(n_chars)
      Same as width_chars=.
      * n_chars : width in chars  
      * Returns: n_chars
  
  == Properties
  --- activates-default: true or false (Read/Write)
      Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed
  
  --- cursor-position: Integer (Read)
      The current position of the insertion cursor in chars
  
  --- editable: true or false (Read/Write)
      Whether the entry contents can be edited
  
  --- has-frame: true or false (Read/Write)
      FALSE removes outside bevel from entry
  
  --- invisible-char: Integer (Read/Write)
      The character to use when masking entry contents (in "password mode")
  
  --- max-length: Integer (Read/Write)
      Maximum number of characters for this entry. Zero if no maximum
  
  --- scroll-offset: Integer (Read)
      Number of pixels of the entry scrolled off the screen to the left
  
  --- selection-bound: Integer (Read)
      The position of the opposite end of the selection from the cursor in chars
  
  --- text: String (Read/Write)
      The contents of the entry
  
  --- visibility: true or false (Read/Write)
      FALSE displays the "invisible char" instead of the actual text (password mode)
  
  --- width-chars: Integer (Read/Write)
      Number of characters to leave space for in the entry
  
  == Signals
  --- activate: self
      Emit when return key is pressed.
       * self: Gtk::Entry
  
  --- copy-clipboard: self
       * self: Gtk::Entry
  
  --- cut-clipboard: self
       * self: Gtk::Entry
  
  --- delete-from-cursor: self, delete_type, position
       * self: Gtk::Entry
       * delete_type: ((<GtkDeleteType|Gtk#GtkDeleteType>))
       * position: position of the cursor
  
  --- insert-at-cursor: self, text
      Doesn't this work?
  
  --- move-cursor: self, step, count, extend_selection
      Emits when cursor(direction) keys are pressed.
       * self: Gtk::Entry
       * step: ((<GtkMovementStep|Gtk#GtkMovementStep>))
       * count: Move count. +1 is order direction, -1 is opposite order.
-      * extend_selection: Selectio or not
+      * extend_selection: true if it extends selection or false.
  
  --- paste-clipboard: self
       * self: Gtk::Entry
  
  --- populate-popup: self, menu
      Emits when right click on the Gtk::Entry.
       * self: Gtk::Entry
       * menu: Gtk::Menu (Popup menu)
  
  --- toggle-overwrite: self
      Emits when overwrite key is pressed.
       * self: Gtk::Entry
  
  - ((<Masao>))





ruby-gnome2-cvs メーリングリストの案内
Back to archive index