Gnm.App

g GObject.Object GObject.Object Gnm.App Gnm.App GObject.Object->Gnm.App

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

add_extra_ui (group_name, actions, layout, domain)

class

clipboard_area_get ()

class

clipboard_clear (drop_selection)

class

clipboard_contents_get ()

class

clipboard_cut_copy (wbc, is_cut, sv, area, animate_range)

class

clipboard_cut_copy_obj (wbc, is_cut, sv, objects)

class

clipboard_invalidate_sheet (sheet)

class

clipboard_is_cut ()

class

clipboard_is_empty ()

class

clipboard_sheet_get ()

class

clipboard_sheet_view_get ()

class

clipboard_unant ()

class

create_opener_filter (openers)

class

display_dpi_get (horizontal)

class

dpi_to_pixels ()

class

flag_windows_changed_ ()

class

foreach_extra_ui (func, *data)

class

get_app ()

class

history_add (filename, mimetype)

class

history_get_list (max_elements)

class

initial_open_complete ()

class

recalc ()

class

recalc_clear_caches ()

class

recalc_finish ()

class

recalc_start ()

class

remove_extra_ui (extra_ui)

class

sanity_check ()

class

shutting_down ()

class

workbook_get_by_index (i)

class

workbook_get_by_name (name, ref_uri)

class

workbook_list ()

class

workbook_list_add (wb)

class

workbook_list_remove (wb)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

file-history-list

int

r

A list of filenames that have been read recently

initial-open-complete

bool

r/w

All command-line files open?

shutting-down

bool

r/w

In the process of shutting down?

Signals

Inherited:

GObject.Object (1)

Name

Short Description

clipboard-modified

custom-ui-added

custom-ui-removed

recalc-clear-caches

recalc-finished

window-list-changed

workbook-added

workbook-removed

Fields

Inherited:

GObject.Object (1)

Class Details

class Gnm.App(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod add_extra_ui(group_name, actions, layout, domain)
Parameters:
  • group_name (str) – action group name.

  • actions ([Gnm.Action]) – list of actions.

  • layout (str) – the xml string describing the menus and toolbars.

  • domain (str) – localization domain.

Returns:

the newly allocated Gnm.AppExtraUI.

Return type:

Gnm.AppExtraUI

classmethod clipboard_area_get()
Returns:

the current range in the clipboard.

Return type:

Gnm.Range or None

classmethod clipboard_clear(drop_selection)
Parameters:

drop_selection (bool) –

Clear and free the contents of the clipboard if it is not empty.

classmethod clipboard_contents_get()
Returns:

the current contents of the clipboard.

Return type:

Gnm.CellRegion or None

classmethod clipboard_cut_copy(wbc, is_cut, sv, area, animate_range)
Parameters:
  • wbc (Gnm.WorkbookControl) – the GOffice.workbook control that requested the operation.

  • is_cut (bool) – is this a cut or a copy.

  • sv (Gnm.SheetView) – The source sheet for the copy.

  • area (Gnm.Range) – A single rectangular range to be copied.

  • animate_range (bool) – Do we want to add an animated Gnm.cursor around things.

When Cutting we Clear and free the contents of the clipboard and save the sheet and area to be cut. DO NOT ACTUALLY CUT! Paste will move the region if this was a cut operation.

When Copying we Clear and free the contents of the clipboard and COPY the designated region into the clipboard.

we need to pass wbc as a control rather than a simple command-context so that the control can claim the selection.

classmethod clipboard_cut_copy_obj(wbc, is_cut, sv, objects)
Parameters:

Different than copying/cutting a region, this can actually cut an object

classmethod clipboard_invalidate_sheet(sheet)
Parameters:

sheet (Gnm.Sheet) –

classmethod clipboard_is_cut()
Return type:

bool

classmethod clipboard_is_empty()
Return type:

bool

classmethod clipboard_sheet_get()
Returns:

the current clipboard Gnm.Sheet.

Return type:

Gnm.Sheet or None

classmethod clipboard_sheet_view_get()
Returns:

the current clipboard Gnm.SheetView.

Return type:

Gnm.SheetView or None

classmethod clipboard_unant()
classmethod create_opener_filter(openers)
Parameters:

openers ([GOffice.FileOpener]) – a list of file openers.

Returns:

the newly allocated Gtk.FileFilter.

Return type:

object or None

Creates a Gtk.FileFilter from the list of file types supported by the openers in the list.

classmethod display_dpi_get(horizontal)
Parameters:

horizontal (bool) –

Return type:

float

classmethod dpi_to_pixels()
Return type:

float

classmethod flag_windows_changed_()

An internal utility routine to flag a regeneration of the window lists

classmethod foreach_extra_ui(func, *data)
Parameters:

Applies func to each Gnm.AppExtraUI.

classmethod get_app()
Returns:

the Gnm.App instance.

Return type:

GObject.Object

classmethod history_add(filename, mimetype)
Parameters:
  • filename (str) –

  • mimetype (str) –

classmethod history_get_list(max_elements)
Parameters:

max_elements (int) –

Returns:

the list, which must be freed along with the strings in it.

Return type:

[str]

creating it if necessary.

classmethod initial_open_complete()
Return type:

bool

classmethod recalc()

Recalculate everything dirty in all workbooks that have automatic recalc turned on.

classmethod recalc_clear_caches()
classmethod recalc_finish()
classmethod recalc_start()
classmethod remove_extra_ui(extra_ui)
Parameters:

extra_ui (Gnm.AppExtraUI) –

classmethod sanity_check()
classmethod shutting_down()
Return type:

bool

classmethod workbook_get_by_index(i)
Parameters:

i (int) – index

Returns:

the nth GOffice.workbook, if any.

Return type:

Gnm.Workbook or None

Get nth GOffice.workbook. Index is zero-based.

classmethod workbook_get_by_name(name, ref_uri)
Parameters:
  • name (str) – the GOffice.workbook name.

  • ref_uri (str) –

Returns:

the Gnm.Workbook or None.

Return type:

Gnm.Workbook

classmethod workbook_list()
Returns:

the GOffice.workbook list.

Return type:

[Gnm.Workbook]

classmethod workbook_list_add(wb)
Parameters:

wb (Gnm.Workbook) – A Gnm.Workbook

Add wb to the application’s list of workbooks.

classmethod workbook_list_remove(wb)
Parameters:

wb (Gnm.Workbook) – A Gnm.Workbook

Remove wb from the application’s list of workbooks.

Signal Details

Gnm.App.signals.clipboard_modified(app)
Signal Name:

clipboard-modified

Flags:

RUN_LAST

Parameters:

app (Gnm.App) – The object which received the signal

Gnm.App.signals.custom_ui_added(app, object)
Signal Name:

custom-ui-added

Flags:

RUN_LAST

Parameters:
Gnm.App.signals.custom_ui_removed(app, object)
Signal Name:

custom-ui-removed

Flags:

RUN_LAST

Parameters:
Gnm.App.signals.recalc_clear_caches(app)
Signal Name:

recalc-clear-caches

Flags:

RUN_LAST

Parameters:

app (Gnm.App) – The object which received the signal

Gnm.App.signals.recalc_finished(app)
Signal Name:

recalc-finished

Flags:

RUN_LAST

Parameters:

app (Gnm.App) – The object which received the signal

Gnm.App.signals.window_list_changed(app)
Signal Name:

window-list-changed

Flags:

RUN_LAST

Parameters:

app (Gnm.App) – The object which received the signal

Gnm.App.signals.workbook_added(app, object)
Signal Name:

workbook-added

Flags:

RUN_LAST

Parameters:
Gnm.App.signals.workbook_removed(app, object)
Signal Name:

workbook-removed

Flags:

RUN_LAST

Parameters:

Property Details

Gnm.App.props.file_history_list
Name:

file-history-list

Type:

int

Default Value:

None

Flags:

READABLE

A list of filenames that have been read recently

Gnm.App.props.initial_open_complete
Name:

initial-open-complete

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

All command-line files open?

Gnm.App.props.shutting_down
Name:

shutting-down

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

In the process of shutting down?