![]() |
![]() |
![]() |
The AnacondaWidgets Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
struct AnacondaBaseWindow; struct AnacondaBaseWindowClass; GtkWidget * anaconda_base_window_new (); void anaconda_base_window_retranslate (AnacondaBaseWindow *win
); gboolean anaconda_base_window_get_beta (AnacondaBaseWindow *win
); void anaconda_base_window_set_beta (AnacondaBaseWindow *win
,gboolean is_beta
); void anaconda_base_window_set_error (AnacondaBaseWindow *win
,const char *msg
); void anaconda_base_window_set_info (AnacondaBaseWindow *win
,const char *msg
); void anaconda_base_window_set_warning (AnacondaBaseWindow *win
,const char *msg
); void anaconda_base_window_clear_info (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_action_area (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_alignment (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_main_box (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_nav_area (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_nav_area_background_window (AnacondaBaseWindow *win
); GtkWidget * anaconda_base_window_get_help_button (AnacondaBaseWindow *win
);
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBin +----AnacondaBaseWindow +----AnacondaBaseStandalone +----AnacondaSpokeWindow
A AnacondaBaseWindow is a widget that contains other widgets and serves as the base class from which all other specialized Anaconda windows are derived.
The AnacondaBaseWindow consists of two areas:
A navigation area in the top of the screen, consisting of some basic information about what is being displayed and what is being installed.
An action area in the majority of the screen. This area is where subclasses should add their particular widgets.
The AnacondaBaseWindow implementation of the GtkBuildable interface exposes
the nav_area
as an internal child with the name "nav_area" and the
action_area
as an internal child with the name "action_area".
Example 1. A AnacondaBaseWindow UI definition fragment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
<object class="AnacondaBaseWindow" id="window1"> <child internal-child="main_box"> <object class="GtkBox" id="main_box1"> <child internal-child="nav_box"> <object class="GtkEventBox" id="nav_box1"> <child internal-child="nav_area"> <object class="GtkGrid" id="nav_area1"> <child>...</child> <child>...</child> </object> </child> </object> </child> <child internal-child="alignment"> <object class="GtkAlignment" id="alignment1"> <child internal-child="action_area"> <object class="GtkBox" id="action_area1"> <child> <object class="GtkLabel" id="label1"> <property name="label" translatable="yes">THIS IS ONE LABEL</property> </object> </child> <child> <object class="GtkLabel" id="label2"> <property name="label" translatable="yes">THIS IS ANOTHER LABEL</property> </object> </child> </object> </child> </object> </child> </object> </child> </object> |
Example 2.
1 2 3 4 5 6 7 |
AnacondaBaseWindow ╰── #nav-box ├── #anaconda-name-label ├── #anaconda-distro-label ├── #anaconda-beta-label ├── #layout-indicator ╰── #anaconda-help-button |
The internal widgets are accessible by name for the purposes of CSS selectors.
nav-box
The navigation area at the top of the screen.
anaconda-name-label
The window name. This is title of the window, such as "INSTALLATION SUMMARY" or "SOFTWARE SELECTION".
anaconda-distro-label
The distrubtion name; e.g., "FEDORA 23 INSTALLATION"
anaconda-beta-label
The "PRE-RELEASE / TESTING" label shown in pre-release installers.
layout-indicator
The AnacondaLayoutIndicator widget.
anaconda-help-button
The help GtkButton.
struct AnacondaBaseWindow;
The AnacondaBaseWindow struct contains only private fields and should not be directly accessed.
struct AnacondaBaseWindowClass { GtkBinClass parent_class; void (* info_bar_clicked) (AnacondaBaseWindow *window); void (* help_button_clicked) (AnacondaBaseWindow *window); };
GtkBinClass |
The object class structure needs to be the first element in the widget class structure in order for the class mechanism to work correctly. This allows a AnacondaBaseWindowClass pointer to be cast to a GtkBin pointer. |
Function pointer called when the "info-bar-clicked" signal is emitted. | |
Function pointer called when the "help-button-clicked" signal is emitted. |
GtkWidget * anaconda_base_window_new ();
Creates a new AnacondaBaseWindow, which is a toplevel, non-resizeable window that contains other widgets. This is the base class for all other Anaconda windows and creates the window style that all windows will share.
Returns : |
A new AnacondaBaseWindow. |
void anaconda_base_window_retranslate (AnacondaBaseWindow *win
);
Reload translations for this widget as needed. Generally, this is not needed. However when changing the language during installation, we need to be able to make sure the screen gets retranslated. This function is kind of ugly but avoids having to destroy and reload the screen.
|
a AnacondaBaseWindow |
Since 1.0
gboolean anaconda_base_window_get_beta (AnacondaBaseWindow *win
);
Returns whether or not this window is set to display the beta label.
|
a AnacondaBaseWindow |
Returns : |
Whether win is set to display the betanag warning |
Since 1.0
void anaconda_base_window_set_beta (AnacondaBaseWindow *win
,gboolean is_beta
);
Sets up the window to display the beta label in red along the top of the screen.
|
a AnacondaBaseWindow |
|
TRUE to display the betanag warning |
Since 1.0
void anaconda_base_window_set_error (AnacondaBaseWindow *win
,const char *msg
);
Causes an info bar to be shown at the bottom of the screen with the provided message. Only one message may be shown at a time. In order to show a second message, anaconda_base_window_clear_info must first be called.
The message will be interpreted as Pango markup. Clickable messages are
encouraged to include a clickable link using the GtkLabel syntax in order
to make the info bar accessible via the keyboard. The link URI will be
ignored, and all link clicks will emit the
"info-bar-clicked" signal on win
.
|
a AnacondaBaseWindow |
|
a message |
Since 1.0
void anaconda_base_window_set_info (AnacondaBaseWindow *win
,const char *msg
);
Causes an info bar to be shown at the bottom of the screen with the provided message. Only one message may be shown at a time. In order to show a second message, anaconda_base_window_clear_info must first be called.
The message will be interpreted as Pango markup. Clickable messages are
encouraged to include a clickable link using the GtkLabel syntax in order
to make the info bar accessible via the keyboard. The link URI will be
ignored, and all link clicks will emit the
"info-bar-clicked" signal on win
.
|
a AnacondaBaseWindow |
|
a message |
Since 1.0
void anaconda_base_window_set_warning (AnacondaBaseWindow *win
,const char *msg
);
Causes an info bar to be shown at the bottom of the screen with the provided message. Only one message may be shown at a time. In order to show a second message, anaconda_base_window_clear_info must first be called.
The message will be interpreted as Pango markup. Clickable messages are
encouraged to include a clickable link using the GtkLabel syntax in order
to make the info bar accessible via the keyboard. The link URI will be
ignored, and all link clicks will emit the
"info-bar-clicked" signal on win
.
|
a AnacondaBaseWindow |
|
a message |
Since 1.0
void anaconda_base_window_clear_info (AnacondaBaseWindow *win
);
Clear and hide any info bar being shown at the bottom of the screen. This must be called before a second call to anaconda_base_window_set_info takes effect.
|
a AnacondaBaseWindow |
Since 1.0
GtkWidget * anaconda_base_window_get_action_area
(AnacondaBaseWindow *win
);
Returns the action area of win
. This is the area of the screen where most
of the widgets the user interacts with will live.
|
a AnacondaBaseWindow |
Returns : |
The action area. [transfer none] |
Since 1.0
GtkWidget * anaconda_base_window_get_alignment (AnacondaBaseWindow *win
);
Returns the internal alignment widget of win
. Currently, this is only used
by AnacondaHubWindow to set different alignment values than the spokes have.
This function should probably not be used elsewhere.
|
a AnacondaBaseWindow |
Returns : |
The alignment widget. [transfer none] |
Since 1.0
GtkWidget * anaconda_base_window_get_main_box (AnacondaBaseWindow *win
);
Returns the main content area of win
. This widget holds both the action_area
and the nav_area. Currently, this is only used by AnacondaStandaloneWindow
as a place to store the extra Continue button. This function should probably
not be used elsewhere.
|
a AnacondaBaseWindow |
Returns : |
The main content area. [transfer none] |
Since 1.0
GtkWidget * anaconda_base_window_get_nav_area (AnacondaBaseWindow *win
);
Returns the navigation area of win
. This is the area at the top of the
screen displaying the window's title (if it has one), distribution, and
so forth.
|
a AnacondaBaseWindow |
Returns : |
The navigation area. [transfer none] |
Since 1.0
GtkWidget * anaconda_base_window_get_nav_area_background_window
(AnacondaBaseWindow *win
);
Returns the event box that houses background window of the navigation area of win
.
Currently, this is only used by AnacondaSpokeWindow to have a place to store the
gradient image. This function should probably not be used elsewhere.
|
a AnacondaBaseWindow |
Returns : |
The event box. [transfer none] |
Since 1.0
GtkWidget * anaconda_base_window_get_help_button
(AnacondaBaseWindow *win
);
Returns the help button.
|
a AnacondaBaseWindow |
Returns : |
the help button. [transfer none] |
Since 3.1
"distribution"
property"distribution" gchar* : Read / Write
The :distribution string is displayed in the upper right corner of all windows throughout installation.
Default value: "DISTRIBUTION INSTALLATION"
Since 1.0
"window-name"
property"window-name" gchar* : Read / Write
The name of the currently displayed window, displayed in the upper left corner of all windows with a title throughout installation. StandaloneWindows should not have a title, so no name will be displayed for those.
Default value: "SPOKE NAME"
Since 1.0
"help-button-clicked"
signalvoid user_function (AnacondaBaseWindow *window,
gpointer user_data) : Action
Emitted when the help button in the right corner has been activated (pressed and released). This is commonly used to open the help view with help content for the given spoke or hub
|
the window that received the signal |
|
user data set when the signal handler was connected. |
Since 3.1
"info-bar-clicked"
signalvoid user_function (AnacondaBaseWindow *window,
gpointer user_data) : Action
Emitted when a visible info bar at the bottom of the window has been clicked (pressed and released). This allows, for instance, popping up a dialog with more detailed information.
Activatable info bars are encouraged to include a link in the message for the
purpose of keyboard navigation. Clicking the link will emit the
info-bar-clicked signal. See anaconda_base_window_set_error()
for more
information.
|
the window that received the signal |
|
user data set when the signal handler was connected. |
Since 1.0