BtEditApplication

BtEditApplication — class for a gtk based buzztard editor application

Synopsis

#include "bt-edit.h"

                    BtEditApplication;
BtEditApplication * bt_edit_application_new             (void);
gboolean            bt_edit_application_new_song        (const BtEditApplication *self);
gboolean            bt_edit_application_load_song       (const BtEditApplication *self,
                                                         const char *file_name);
gboolean            bt_edit_application_save_song       (const BtEditApplication *self,
                                                         const char *file_name);
gboolean            bt_edit_application_run             (const BtEditApplication *self);
gboolean            bt_edit_application_load_and_run    (const BtEditApplication *self,
                                                         const gchar *input_file_name);
gboolean            bt_edit_application_quit            (const BtEditApplication *self);
void                bt_edit_application_show_about      (const BtEditApplication *self);
void                bt_edit_application_show_tip        (const BtEditApplication *self);
void                bt_edit_application_ui_lock         (const BtEditApplication *self);
void                bt_edit_application_ui_unlock       (const BtEditApplication *self);

Object Hierarchy

  GObject
   +----BtApplication
         +----BtEditApplication

Properties

  "ic-registry"              BtIcRegistry*         : Read
  "main-window"              BtMainWindow*         : Read
  "song"                     BtSong*               : Read / Write

Description

Opens the BtMainWindow and provide application level function like load, save, run and exit.

Details

BtEditApplication

typedef struct _BtEditApplication BtEditApplication;

BtApplication subclass for the gtk editor application


bt_edit_application_new ()

BtEditApplication * bt_edit_application_new             (void);

Create a new instance on first call and return a reference later on.

Returns :

the new signleton instance

bt_edit_application_new_song ()

gboolean            bt_edit_application_new_song        (const BtEditApplication *self);

Creates a new blank song instance. If there is a previous song instance it will be freed.

self :

the application instance to create a new song in

Returns :

TRUE for success

bt_edit_application_load_song ()

gboolean            bt_edit_application_load_song       (const BtEditApplication *self,
                                                         const char *file_name);

Loads a new song. If there is a previous song instance it will be freed.

self :

the application instance to load a new song in

file_name :

the song filename to load

Returns :

true for success

bt_edit_application_save_song ()

gboolean            bt_edit_application_save_song       (const BtEditApplication *self,
                                                         const char *file_name);

Saves a song.

self :

the application instance to save a song from

file_name :

the song filename to save

Returns :

true for success

bt_edit_application_run ()

gboolean            bt_edit_application_run             (const BtEditApplication *self);

Start the gtk based editor application

self :

the application instance to run

Returns :

TRUE for success

bt_edit_application_load_and_run ()

gboolean            bt_edit_application_load_and_run    (const BtEditApplication *self,
                                                         const gchar *input_file_name);

load the file of the supplied name and start the gtk based editor application

self :

the application instance to run

input_file_name :

the file to load initially

Returns :

true for success

bt_edit_application_quit ()

gboolean            bt_edit_application_quit            (const BtEditApplication *self);

End the application. Eventualy asks the user for confirmation.

self :

the application instance to quit

Returns :

TRUE it ending the application was confirmed

bt_edit_application_show_about ()

void                bt_edit_application_show_about      (const BtEditApplication *self);

Shows the applications about window

self :

the application instance

bt_edit_application_show_tip ()

void                bt_edit_application_show_tip        (const BtEditApplication *self);

Shows the tip of the day window

self :

the application instance

bt_edit_application_ui_lock ()

void                bt_edit_application_ui_lock         (const BtEditApplication *self);

Sets the main window insensitive and show a wait cursor.

self :

the application instance

bt_edit_application_ui_unlock ()

void                bt_edit_application_ui_unlock       (const BtEditApplication *self);

Sets the main window sensitive again and unset the wait cursor.

self :

the application instance

Property Details

The "ic-registry" property

  "ic-registry"              BtIcRegistry*         : Read

the interaction controller registry of this application.


The "main-window" property

  "main-window"              BtMainWindow*         : Read

the main window of this application.


The "song" property

  "song"                     BtSong*               : Read / Write

the current song object.

See Also

BtMainWindow