Gnm.ExprEntry¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2), GOffice.GraphDataEditor (2), Gtk.CellEditable (3)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1), Gtk.CellEditable (1)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Format for constants |
||
r/w |
|||
r/w |
The GUI container associated with the entry. |
||
r/w |
The contents of the entry |
||
r/w |
How frequently changes to the entry should be applied |
||
r/w |
The toplevel GUI container associated with the entry. |
||
r/w |
Should there be an icon to the right of the entry? |
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
Name |
Short Description |
---|---|
Fields¶
Class Details¶
- class Gnm.ExprEntry(*args, **kwargs)¶
- Bases:
- Abstract:
No
- classmethod new(wbcg, with_icon)¶
- Parameters:
wbcg (
Gnm.WBCGtk
) –Gnm.WBCGtk
with_icon (
bool
) – append a rollup icon to the end of the entry
- Returns:
a new
Gnm.ExprEntry
.- Return type:
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 seeGnm.ExprEntry.set_flags
.
- can_rangesel()¶
- close_tips()¶
- disable_tips()¶
- enable_tips()¶
- find_range()¶
- Return type:
Look at the current selection to see how much of it needs to be changed when selecting a range.
- freeze()¶
- get_rangesel()¶
- Returns:
True
if the returned range is indeed valid. The resulting range is normalized.- r:
address to receive
Gnm.Range
- sheet:
address to receive #sheet
- Return type:
Get the range selection.
Gnm.Range
is copied,Gnm.Sheet
is not. If sheet argument isNone
, the correspondingGOffice.value
is not returned.
- get_scg()¶
- Returns:
the associated
Gnm.SheetControlGUI
.- Return type:
- get_text()¶
- Returns:
The content of the entry. Caller should not modify the result.
- Return type:
A small convenience routine. Think long and hard before using this. There are lots of parse routines that serve the common case.
- is_cell_ref(sheet, allow_multiple_cell)¶
- load_from_dep(dep)¶
- Parameters:
dep (
Gnm.Dependent
) – A dependent
Sets the text of the entry, and removes saved information about earlier range selections.
- load_from_expr(texpr, pp)¶
- Parameters:
texpr (
Gnm.ExprTop
) – An expressionpp (
Gnm.ParsePos
) – The parse position
Sets the text of the entry, and removes saved information about earlier range selections.
- load_from_range(sheet, r)¶
- Parameters:
- Returns:
true if displayed range is different from input range. false 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.
- Return type:
- parse(pp, perr, start_sel, flags)¶
- Parameters:
pp (
Gnm.ParsePos
) – a parse positionperr (
Gnm.ParseError
) –start_sel (
bool
) – start range selection when things change.flags (
Gnm.ExprParseFlags
) –
- Return type:
Attempts to parse the content of the entry line honouring the flags.
- parse_as_list(sheet)¶
- 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:
a (
GLib.SList
*) orNone
on failure.- Return type:
- parse_as_value(sheet)¶
-
Returns a (
Gnm.Value
*) of typeGnm.ValueType.CELLRANGE
if the range was successfully parsed orNone
on failure.
- rangesel_stop(clear_string)¶
- Parameters:
clear_string (
bool
) – clear string flag
Perform the appropriate action when a range selection has been completed.
- set_flags(flags, mask)¶
- Parameters:
flags (
Gnm.ExprEntryFlags
) – bitmap of flag valuesmask (
Gnm.ExprEntryFlags
) – bitmap with ones for flags to be changed
Changes the flags specified in mask to values given in flags.
Flags (
False
by default):Gnm.ExprEntryFlags.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.ExprEntryFlags.FULL_COL
Gnm.Range
consists of full columns.Gnm.ExprEntryFlags.FULL_ROW
Gnm.Range
consists of full rows.Gnm.ExprEntryFlags.SHEET_OPTIONAL
Current sheet name not auto-added.
- set_scg(scg)¶
- Parameters:
scg (
Gnm.SheetControlGUI
) – aGnm.SheetControlGUI
Associates the entry with a
Gnm.SheetControlGUI
. The entry widget automatically removes the association when theGnm.SheetControlGUI
is destroyed.
- set_update_policy(policy)¶
- Parameters:
policy (
Gnm.UpdateType
) – update policy
Sets the update policy for the expr-entry.
Gnm.UpdateType.CONTINUOUS
means that anytime the entry’s content changes, the update signal will be emitted.Gnm.UpdateType.DELAYED
means that the signal will be emitted after a brief timeout when no changes occur, so updates are spaced by a short time rather than continuous.Gnm.UpdateType.DISCONTINUOUS
means that the signal will only be emitted when the user releases the button and ends the rangeselection.
- signal_update(user_requested)¶
- Parameters:
user_requested (
bool
) – is the update requested by the user (eg activation)
Higher level operations know when they are logically complete and can notify
Gnm.ExprEntry
clients. For example, button-up after aGnm.drag
selection indicates a logical end to the change and offers a good time to update.
- thaw()¶
Signal Details¶
- Gnm.ExprEntry.signals.activate(expr_entry)¶
- Signal Name:
activate
- Flags:
- Parameters:
expr_entry (
Gnm.ExprEntry
) – The object which received the signal
- Gnm.ExprEntry.signals.changed(expr_entry)¶
- Signal Name:
changed
- Flags:
- Parameters:
expr_entry (
Gnm.ExprEntry
) – The object which received the signal
- Gnm.ExprEntry.signals.update(expr_entry, object)¶
- Signal Name:
update
- Flags:
- Parameters:
expr_entry (
Gnm.ExprEntry
) – The object which received the signalobject (
bool
) –
Property Details¶
- Gnm.ExprEntry.props.constant_format¶
- Name:
constant-format
- Type:
- Default Value:
- Flags:
Format for constants
- Gnm.ExprEntry.props.scg¶
- Name:
scg
- Type:
- Default Value:
- Flags:
The GUI container associated with the entry.
- Gnm.ExprEntry.props.text¶
-
The contents of the entry
- Gnm.ExprEntry.props.update_policy¶
- Name:
update-policy
- Type:
- Default Value:
- Flags:
How frequently changes to the entry should be applied
- Gnm.ExprEntry.props.wbcg¶
- Name:
wbcg
- Type:
- Default Value:
- Flags:
The toplevel GUI container associated with the entry.