Tepl.Tab¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Gtk.Grid (21), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2), Tepl.TabGroup (8) 
- Structs:
- Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5) 
| class | 
 | 
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
- Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Tepl.TabGroup (4) 
| 
 | |
| 
 | |
| 
 | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| r/w/co | 
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
| Name | Short Description | 
|---|---|
| The  | 
Fields¶
- Inherited:
| Name | Type | Access | Description | 
|---|---|---|---|
| parent | r | 
Class Details¶
- class Tepl.Tab(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - classmethod new()¶
- 
Creates a new Tepl.Tabwith a newTepl.View. The newTepl.Viewcan be retrieved afterwards withTepl.Tab.get_view().New in version 3.0. 
 - classmethod new_with_view(view)¶
- Parameters:
- view ( - Tepl.View) – the- Tepl.Viewthat will be contained in the tab.
- Returns:
- a new - Tepl.Tab.
- Return type:
 - New in version 3.0. 
 - add_info_bar(info_bar)¶
- Parameters:
- info_bar ( - Gtk.InfoBar) – a- Gtk.InfoBar.
 - Attaches info_bar to self. - This function calls the ::pack_info_bar virtual function. - New in version 1.0. 
 - get_buffer()¶
- Returns:
- the - Tepl.Bufferof the- Tepl.Tab- :view.
- Return type:
 - A convenience function that calls - Gtk.TextView.get_buffer() on the- Tepl.Tab- :viewassociated with the self.- New in version 3.0. 
 - get_goto_line_bar()¶
- Returns:
- the - Tepl.GotoLineBarwidget belonging to self.
- Return type:
 - Gets the - Tepl.GotoLineBarwidget belonging to self. The- Tepl.GotoLineBarmust not be destroyed by the application, the purpose of this function is to show/hide the widget.- New in version 5.0. 
 - load_file(location)¶
- 
Unconditionally loads a file in self, regardless if there are unsaved changes in the Gtk.TextBuffer. The previous buffer content is lost.This function is asynchronous, there is no way to know when the file loading is finished. New in version 4.0. 
 - save_as_async(callback, *user_data)¶
- Parameters:
- callback ( - Gio.AsyncReadyCallbackor- None) – a- Gio.AsyncReadyCallbackto call when the request is satisfied.
 
 - Shows a - Gtk.FileChooserto save the self to a different location, creates an appropriate- Tepl.FileSaverand asynchronously runs it.- See the - Gio.AsyncResultdocumentation to know how to use this function.- New in version 4.0. 
 - save_as_async_simple()¶
- The same as - Tepl.Tab.save_as_async(), but without callback.- This function is useful when you don’t need to know: - when the operation is finished; 
- and whether the operation ran successfully. 
 - New in version 4.0. 
 - save_as_finish(result)¶
- Parameters:
- result ( - Gio.AsyncResult) – a- Gio.AsyncResult.
- Returns:
- whether the tab was saved successfully. 
- Return type:
 - Finishes a tab saving started with - Tepl.Tab.save_as_async().- New in version 4.0. 
 - save_async(callback, *user_data)¶
- Parameters:
- callback ( - Gio.AsyncReadyCallbackor- None) – a- Gio.AsyncReadyCallbackto call when the request is satisfied.
 
 - Saves asynchronously the content of the self. The - Tepl.File- :locationmust not be- None.- See the - Gio.AsyncResultdocumentation to know how to use this function.- New in version 4.0. 
 - save_async_simple()¶
- The same as - Tepl.Tab.save_async(), but without callback.- This function is useful when you don’t need to know: - when the operation is finished; 
- and whether the operation ran successfully. 
 - New in version 4.0. 
 - save_finish(result)¶
- Parameters:
- result ( - Gio.AsyncResult) – a- Gio.AsyncResult.
- Returns:
- whether the tab was saved successfully. 
- Return type:
 - Finishes a tab saving started with - Tepl.Tab.save_async().- New in version 4.0. 
 - do_close_request() virtual¶
- For the - Tepl.Tab- ::close-requestsignal.
 - do_pack_goto_line_bar(goto_line_bar) virtual¶
- Parameters:
- goto_line_bar ( - Tepl.GotoLineBar) –
 - Virtual function pointer to add a - Tepl.GotoLineBarin the- Tepl.Tabcontainer. By default the- Tepl.GotoLineBaris added at the bottom.
 - do_pack_info_bar(info_bar) virtual¶
- Parameters:
- info_bar ( - Gtk.InfoBar) –
 - Virtual function pointer to add a - Gtk.InfoBarin the- Tepl.Tabcontainer. By default the- Gtk.InfoBaris inserted just above the- Gtk.ScrolledWindowcontaining the- Tepl.View.
 - do_pack_view(view) virtual¶
- Parameters:
- view ( - Tepl.View) –
 - Virtual function pointer to add the - Tepl.Viewin the- Tepl.Tabcontainer. Called only once at object construction time, when the- Tepl.Tab- :viewproperty is set. By default the- Tepl.Viewis added to a- Gtk.ScrolledWindowand the- Gtk.ScrolledWindowis added to the- Tepl.Tabwith- Gtk.Container.add().
 
Signal Details¶
- Tepl.Tab.signals.close_request(tab)¶
- Signal Name:
- close-request
- Flags:
- Parameters:
- tab ( - Tepl.Tab) – The object which received the signal
 - The - ::close-requestsignal is emitted when there is a request to close the- Tepl.Tab, for example if the user clicks on a close button.- The default object method handler does the following: - If the buffer is not modified (according to - Gtk.TextBuffer.get_modified()), close the tab.
- Else, show a message dialog to propose to save the file before closing. 
 - To override the default object method handler, either override the virtual function in a - Tepl.Tabsubclass or connect to the signal and call- GObject.signal_stop_emission_by_name().- New in version 3.0.