Class: Gnm::ExprEntry

Inherits:
Gtk::Box
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(wbcg, with_icon) ⇒ Gnm::ExprEntry

Creates a new Gnm::ExprEntry, which is an entry widget with support
for range selections.
The entry is created with default flag settings which are suitable for use
in many dialogs, but see #gnm_expr_entry_set_flags.

Parameters:

  • wbcg (Gnm::WBCGtk) —

    #WBCGtk

  • with_icon (Boolean) —

    append a rollup icon to the end of the entry

Instance Method Details

#can_rangesel ⇒ Boolean

Returns true if a range selection is meaningful at current position.

Returns:

  • (Boolean) —

    true if a range selection is meaningful at current position.

#close_tips ⇒ nil

Returns:

  • (nil)

#constant_format ⇒ GOffice::Format

Returns constant-format.

Returns:

  • (GOffice::Format) —

    constant-format

#constant_format=(constant_format) ⇒ GOffice::Format

Parameters:

  • constant_format (GOffice::Format)

Returns:

  • (GOffice::Format) —

    constant-format

  • (GOffice::Format) —

    constant-format

#disable_tips ⇒ nil

Returns:

  • (nil)

#editing_canceled ⇒ Boolean

Returns:

  • (Boolean)

#enable_tips ⇒ nil

Returns:

  • (nil)

#entry ⇒ Gtk::Entry

Returns the associated Gtk::Entry.

Returns:

  • (Gtk::Entry) —

    the associated Gtk::Entry.

#find_range ⇒ Boolean

Look at the current selection to see how much of it needs to be changed when
selecting a range.

Returns:

  • (Boolean)

#flags ⇒ Integer

Returns flags.

Returns:

  • (Integer) —

    flags

#flags=(flags) ⇒ Integer

Parameters:

  • flags (Integer)

Returns:

  • (Integer) —

    flags

  • (Integer) —

    flags

#freeze ⇒ nil

Returns:

  • (nil)

#get_rangesel(r, sheet) ⇒ Boolean

Get the range selection. GnmRange is copied, Sheet is not. If sheet
argument is NULL, the corresponding value is not returned.
The resulting range is normalized.

Parameters:

  • r (Gnm::Range) —

    address to receive Gnm::Range

  • sheet (Gnm::Sheet) —

    address to receive #sheet

Returns:

  • (Boolean) —

    true if the returned range is indeed valid.

#global_range_name(sheet) ⇒ String

Parameters:

Returns:

  • (String)

#grab_focus(select_all) ⇒ nil

Parameters:

  • select_all (Boolean)

Returns:

  • (nil)

#is_blank ⇒ Boolean

Returns:

  • (Boolean)

#is_cell_ref(sheet, allow_multiple_cell) ⇒ Boolean

Parameters:

  • sheet (Gnm::Sheet)
  • allow_multiple_cell (Boolean)

Returns:

  • (Boolean)

#load_from_dep(dep) ⇒ nil

Sets the text of the entry, and removes saved information about earlier
range selections.

Parameters:

Returns:

  • (nil)

#load_from_expr(texpr, pp) ⇒ nil

Sets the text of the entry, and removes saved information about earlier
range selections.

Parameters:

  • texpr (Gnm::ExprTop) —

    An expression

  • pp (Gnm::ParsePos) —

    The parse position

Returns:

  • (nil)

#load_from_range(sheet, r) ⇒ Boolean

otherwise.

Sets the range selection and displays it in the entry text. If the widget
already contains a range selection, the new text replaces the
old. Otherwise, it is inserted at pos.

Parameters:

  • sheet (Gnm::Sheet) —

    a #sheet

  • r (Gnm::Range) —

    a Gnm::Range

Returns:

  • (Boolean) —

    true if displayed range is different from input range. false

#load_from_text(txt) ⇒ nil

Parameters:

  • txt (String)

Returns:

  • (nil)

#parse(pp, perr, start_sel, flags) ⇒ Gnm::ExprTop

Attempts to parse the content of the entry line honouring
the flags.

Parameters:

  • pp (Gnm::ParsePos) —

    a parse position

  • perr (Gnm::ParseError)
  • start_sel (Boolean) —

    start range selection when things change.

  • flags (Gnm::ExprParseFlags)

Returns:

  • (Gnm::ExprTop)

#parse_as_list(sheet) ⇒ GLib::SList<Gnm::Value>

or NULL on failure.

Parameters:

  • sheet (Gnm::Sheet) —

    the sheet where the cell range is evaluated. This really only needed if
    the range given does not include a sheet specification.

Returns:

  • (GLib::SList<Gnm::Value>) —

    a (GSList *)

#parse_as_value(sheet) ⇒ Gnm::Value

Returns a (GnmValue *) of type VALUE_CELLRANGE if the range was
successfully parsed or nil on failure.

Parameters:

  • sheet (Gnm::Sheet) —

    the sheet where the cell range is evaluated.

Returns:

  • (Gnm::Value)

#rangesel_stop(clear_string) ⇒ nil

Perform the appropriate action when a range selection has been completed.

Parameters:

  • clear_string (Boolean) —

    clear string flag

Returns:

  • (nil)

#scg ⇒ Gnm::SheetControlGUI

Returns scg.

Returns:

#scg=(scg) ⇒ Gnm::SheetControlGUI

Parameters:

Returns:

#set_flags(flags, mask) ⇒ nil

Changes the flags specified in mask to values given in flags.

Flags (false by default):
%GNM_EE_SINGLE_RANGE Entry will only hold a single range.
%GNM_EE_ABS_COL Column reference must be absolute.
%GNM_EE_ABS_ROW Row reference must be absolute.
%GNM_EE_FULL_COL GnmRange consists of full columns.
%GNM_EE_FULL_ROW GnmRange consists of full rows.
%GNM_EE_SHEET_OPTIONAL Current sheet name not auto-added.

Parameters:

Returns:

  • (nil)

#signal_update(user_requested) ⇒ nil

Higher level operations know when they are logically complete and can notify
GnmExprEntry clients. For example, button-up after a drag selection
indicates a logical end to the change and offers a good time to update.

Parameters:

  • user_requested (Boolean) —

    is the update requested by the user (eg activation)

Returns:

  • (nil)

#text ⇒ String

Returns text.

Returns:

  • (String) —

    text

#text=(text) ⇒ String

Parameters:

  • text (String)

Returns:

  • (String) —

    text

  • (String) —

    text

#thaw ⇒ nil

Returns:

  • (nil)

#update_policy ⇒ Gnm::UpdateType

Returns update-policy.

Returns:

#update_policy=(update_policy) ⇒ Gnm::UpdateType

Parameters:

Returns:

#wbcg ⇒ Gnm::WBCGtk

Returns wbcg.

Returns:

#wbcg=(wbcg) ⇒ Gnm::WBCGtk

Parameters:

Returns:

#with_icon=(with_icon) ⇒ Boolean

Parameters:

  • with_icon (Boolean)

Returns:

  • (Boolean) —

    with-icon

  • (Boolean) —

    with-icon

#with_icon? ⇒ Boolean

Returns with-icon.

Returns:

  • (Boolean) —

    with-icon