Cairo-Dock  3.4.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairo-dock-gui-factory.h File Reference

Data Structures

struct  _CairoDockGroupKeyWidget
 Definition of a widget corresponding to a given (group;key) pair. More...
 

Enumerations

enum  CairoDockGUIWidgetType {
  CAIRO_DOCK_WIDGET_CHECK_BUTTON,
  CAIRO_DOCK_WIDGET_CHECK_CONTROL_BUTTON,
  CAIRO_DOCK_WIDGET_SPIN_INTEGER,
  CAIRO_DOCK_WIDGET_HSCALE_INTEGER,
  CAIRO_DOCK_WIDGET_SIZE_INTEGER,
  CAIRO_DOCK_WIDGET_SPIN_DOUBLE,
  CAIRO_DOCK_WIDGET_COLOR_SELECTOR_RGB,
  CAIRO_DOCK_WIDGET_COLOR_SELECTOR_RGBA,
  CAIRO_DOCK_WIDGET_HSCALE_DOUBLE,
  CAIRO_DOCK_WIDGET_VIEW_LIST,
  CAIRO_DOCK_WIDGET_THEME_LIST,
  CAIRO_DOCK_WIDGET_ANIMATION_LIST,
  CAIRO_DOCK_WIDGET_DIALOG_DECORATOR_LIST,
  CAIRO_DOCK_WIDGET_DESKLET_DECORATION_LIST,
  CAIRO_DOCK_WIDGET_DESKLET_DECORATION_LIST_WITH_DEFAULT,
  CAIRO_DOCK_WIDGET_DOCK_LIST,
  CAIRO_DOCK_WIDGET_ICONS_LIST,
  CAIRO_DOCK_WIDGET_ICON_THEME_LIST,
  CAIRO_DOCK_WIDGET_SCREENS_LIST,
  CAIRO_DOCK_WIDGET_JUMP_TO_MODULE,
  CAIRO_DOCK_WIDGET_JUMP_TO_MODULE_IF_EXISTS,
  CAIRO_DOCK_WIDGET_LAUNCH_COMMAND,
  CAIRO_DOCK_WIDGET_LAUNCH_COMMAND_IF_CONDITION,
  CAIRO_DOCK_WIDGET_STRING_ENTRY,
  CAIRO_DOCK_WIDGET_FILE_SELECTOR,
  CAIRO_DOCK_WIDGET_IMAGE_SELECTOR,
  CAIRO_DOCK_WIDGET_FOLDER_SELECTOR,
  CAIRO_DOCK_WIDGET_SOUND_SELECTOR,
  CAIRO_DOCK_WIDGET_SHORTKEY_SELECTOR,
  CAIRO_DOCK_WIDGET_CLASS_SELECTOR,
  CAIRO_DOCK_WIDGET_PASSWORD_ENTRY,
  CAIRO_DOCK_WIDGET_FONT_SELECTOR,
  CAIRO_DOCK_WIDGET_LIST,
  CAIRO_DOCK_WIDGET_LIST_WITH_ENTRY,
  CAIRO_DOCK_WIDGET_NUMBERED_LIST,
  CAIRO_DOCK_WIDGET_NUMBERED_CONTROL_LIST,
  CAIRO_DOCK_WIDGET_NUMBERED_CONTROL_LIST_SELECTIVE,
  CAIRO_DOCK_WIDGET_TREE_VIEW_SORT,
  CAIRO_DOCK_WIDGET_TREE_VIEW_SORT_AND_MODIFY,
  CAIRO_DOCK_WIDGET_TREE_VIEW_MULTI_CHOICE,
  CAIRO_DOCK_WIDGET_EMPTY_WIDGET,
  CAIRO_DOCK_WIDGET_EMPTY_FULL,
  CAIRO_DOCK_WIDGET_TEXT_LABEL,
  CAIRO_DOCK_WIDGET_LINK,
  CAIRO_DOCK_WIDGET_HANDBOOK,
  CAIRO_DOCK_WIDGET_SEPARATOR,
  CAIRO_DOCK_WIDGET_FRAME,
  CAIRO_DOCK_WIDGET_EXPANDER
}
 Types of widgets that Cairo-Dock can automatically build. More...
 
enum  CairoDockGUIModelColumns
 Model used for combo-box and tree-view. CAIRO_DOCK_MODEL_NAME is the name as displayed in the widget, and CAIRO_DOCK_MODEL_RESULT is the resulting string effectively written in the config file.
 

Functions

CairoDockGroupKeyWidgetcairo_dock_gui_find_group_key_widget_in_list (GSList *pWidgetList, const gchar *cGroupName, const gchar *cKeyName)
 

Detailed Description

This class handles the construction of the common widgets used in the conf files.

A conf file is a common group/key file, with the following syntax :

[Group]
#comment about key1
key1 = 1
#comment about key2
key2 = pouic

Each key in the conf file has a comment.

The first character of the comment defines the type of widget. Known types are listed in the CairoDockGUIWidgetType enum.

A key can be a behaviour key or an appearance key. Appearance keys are keys that defines the look of the appli, they belong to the theme. Behaviour keys are keys that define some configuration parameters, that depends on the user. To mark a key as an apppearance one, suffix the widget character with a '+'. Thus, keys not marked with a '+' won't be loaded when the user loads a theme, except if he forces it.

After the widget character and its suffix, some widget accept a list of values. For instance, a spinbutton can have a min and a max limits, a list can have pre-defined elements, etc. Such values are set between '[' and ']' brackets, and separated by ';' inside.

After that, let a blank to start the widget description. It will appear on the left of the widget; description must be short enough to fit the config panel width.

You can complete this description with a tooltip. To do that, on a new comment line, add some text between '{' and '}' brackets. Tooltips appear above the widget when you let the mouse over it for ~1 second. They can be as long as you want. Use '
' to insert new lines inside the tooltip.

Enumeration Type Documentation

Types of widgets that Cairo-Dock can automatically build.

Enumerator
CAIRO_DOCK_WIDGET_CHECK_BUTTON 

boolean in a button to tick.

CAIRO_DOCK_WIDGET_CHECK_CONTROL_BUTTON 

boolean in a button to tick, that will control the sensitivity of the next widget.

CAIRO_DOCK_WIDGET_SPIN_INTEGER 

integer in a spin button.

CAIRO_DOCK_WIDGET_HSCALE_INTEGER 

integer in an horizontal scale.

CAIRO_DOCK_WIDGET_SIZE_INTEGER 

pair of integers for dimansion WidthxHeight

CAIRO_DOCK_WIDGET_SPIN_DOUBLE 

double in a spin button.

CAIRO_DOCK_WIDGET_COLOR_SELECTOR_RGB 

3 doubles with a color selector (RGB).

CAIRO_DOCK_WIDGET_COLOR_SELECTOR_RGBA 

4 doubles with a color selector (RGBA).

CAIRO_DOCK_WIDGET_HSCALE_DOUBLE 

double in an horizontal scale.

CAIRO_DOCK_WIDGET_VIEW_LIST 

list of views.

CAIRO_DOCK_WIDGET_THEME_LIST 

list of themes in a combo, with preview and readme.

CAIRO_DOCK_WIDGET_ANIMATION_LIST 

list of available animations.

CAIRO_DOCK_WIDGET_DIALOG_DECORATOR_LIST 

list of available dialog decorators.

CAIRO_DOCK_WIDGET_DESKLET_DECORATION_LIST 

list of available desklet decorations.

CAIRO_DOCK_WIDGET_DESKLET_DECORATION_LIST_WITH_DEFAULT 

same but with the 'default' choice too.

CAIRO_DOCK_WIDGET_DOCK_LIST 

list of existing docks.

CAIRO_DOCK_WIDGET_ICONS_LIST 

list of icons of a dock.

CAIRO_DOCK_WIDGET_ICON_THEME_LIST 

list of installed icon themes.

CAIRO_DOCK_WIDGET_SCREENS_LIST 

list of screens

CAIRO_DOCK_WIDGET_JUMP_TO_MODULE 

a button to jump to another module inside the config panel.

CAIRO_DOCK_WIDGET_JUMP_TO_MODULE_IF_EXISTS 

same but only if the module exists.

CAIRO_DOCK_WIDGET_LAUNCH_COMMAND 

a button to launch a specific command.

CAIRO_DOCK_WIDGET_LAUNCH_COMMAND_IF_CONDITION 

a button to launch a specific command with a condition.

CAIRO_DOCK_WIDGET_STRING_ENTRY 

a text entry.

CAIRO_DOCK_WIDGET_FILE_SELECTOR 

a text entry with a file selector.

CAIRO_DOCK_WIDGET_IMAGE_SELECTOR 

a text entry with a file selector, files are filtered to only display images.

CAIRO_DOCK_WIDGET_FOLDER_SELECTOR 

a text entry with a folder selector.

CAIRO_DOCK_WIDGET_SOUND_SELECTOR 

a text entry with a file selector and a 'play' button, for sound files.

CAIRO_DOCK_WIDGET_SHORTKEY_SELECTOR 

a text entry with a shortkey selector.

CAIRO_DOCK_WIDGET_CLASS_SELECTOR 

a text entry with a class selector.

CAIRO_DOCK_WIDGET_PASSWORD_ENTRY 

a text entry, where text is hidden and the result is encrypted in the .conf file.

CAIRO_DOCK_WIDGET_FONT_SELECTOR 

a font selector button.

CAIRO_DOCK_WIDGET_LIST 

a text list.

CAIRO_DOCK_WIDGET_LIST_WITH_ENTRY 

a combo-entry, that is to say a list where one can add a custom choice.

CAIRO_DOCK_WIDGET_NUMBERED_LIST 

a combo where the number of the line is used for the choice.

CAIRO_DOCK_WIDGET_NUMBERED_CONTROL_LIST 

a combo where the number of the line is used for the choice, and for controlling the sensitivity of the widgets below.

CAIRO_DOCK_WIDGET_NUMBERED_CONTROL_LIST_SELECTIVE 

a combo where the number of the line is used for the choice, and for controlling the sensitivity of the widgets below; controlled widgets are indicated in the list : {entry;index first widget;nb widgets}.

CAIRO_DOCK_WIDGET_TREE_VIEW_SORT 

a tree view, where lines are numbered and can be moved up and down.

CAIRO_DOCK_WIDGET_TREE_VIEW_SORT_AND_MODIFY 

a tree view, where lines can be added, removed, and moved up and down.

CAIRO_DOCK_WIDGET_TREE_VIEW_MULTI_CHOICE 

a tree view, where lines are numbered and can be selected or not.

CAIRO_DOCK_WIDGET_EMPTY_WIDGET 

an empty GtkContainer, in case you need to build custom widgets.

CAIRO_DOCK_WIDGET_EMPTY_FULL 

an empty GtkContainer, the same but using full available space.

CAIRO_DOCK_WIDGET_TEXT_LABEL 

a simple text label.

CAIRO_DOCK_WIDGET_LINK 

a simple text label.

CAIRO_DOCK_WIDGET_HANDBOOK 

a label containing the handbook of the applet.

CAIRO_DOCK_WIDGET_SEPARATOR 

an horizontal separator.

CAIRO_DOCK_WIDGET_FRAME 

a frame. The previous frame will be closed.

CAIRO_DOCK_WIDGET_EXPANDER 

a frame inside an expander. The previous frame will be closed.

Function Documentation

CairoDockGroupKeyWidget* cairo_dock_gui_find_group_key_widget_in_list ( GSList *  pWidgetList,
const gchar *  cGroupName,
const gchar *  cKeyName 
)

Get a widget from a list of widgets representing a configuration window. The widgets represent a pair (group,key) as defined in the config file.

Parameters
pWidgetListlist of widgets built from the config file
cGroupNamename of the group the widget belongs to
cKeyNamename of the key the widget represents
Returns
the widget asociated with the (group,key) , or NULL if none is found