geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
Interface to the Build menu functionality. More...
Go to the source code of this file.
Typedefs | |
typedef enum GeanyBuildCmdEntries | GeanyBuildCmdEntries |
The entries of a command for a menu item. More... | |
Enumerations | |
enum | GeanyBuildGroup { GEANY_GBG_FT , GEANY_GBG_NON_FT , GEANY_GBG_EXEC , GEANY_GBG_COUNT } |
Groups of Build menu items. More... | |
enum | GeanyBuildSource { GEANY_BCS_DEF , GEANY_BCS_FT , GEANY_BCS_HOME_FT , GEANY_BCS_PREF , GEANY_BCS_PROJ_FT , GEANY_BCS_PROJ , GEANY_BCS_COUNT } |
Build menu item sources in increasing priority. More... | |
enum | GeanyBuildCmdEntries { GEANY_BC_LABEL , GEANY_BC_COMMAND , GEANY_BC_WORKING_DIR , GEANY_BC_CMDENTRIES_COUNT } |
The entries of a command for a menu item. More... | |
Functions | |
void | build_activate_menu_item (const GeanyBuildGroup grp, const guint cmd) |
Activate the menu item. More... | |
const gchar * | build_get_current_menu_item (const GeanyBuildGroup grp, const guint cmd, const GeanyBuildCmdEntries field) |
Get the string for the menu item field. More... | |
void | build_remove_menu_item (const GeanyBuildSource src, const GeanyBuildGroup grp, const gint cmd) |
Remove the specified Build menu item. More... | |
void | build_set_menu_item (const GeanyBuildSource src, const GeanyBuildGroup grp, const guint cmd, const GeanyBuildCmdEntries field, const gchar *value) |
Set the string for the menu item field. More... | |
guint | build_get_group_count (const GeanyBuildGroup grp) |
Get the count of commands for the group. More... | |
Interface to the Build menu functionality.
Definition in file build.h.
typedef enum GeanyBuildCmdEntries GeanyBuildCmdEntries |
The entries of a command for a menu item.
enum GeanyBuildCmdEntries |
enum GeanyBuildGroup |
enum GeanyBuildSource |
Build menu item sources in increasing priority.
void build_activate_menu_item | ( | const GeanyBuildGroup | grp, |
const guint | cmd | ||
) |
Activate the menu item.
Activate the menu item specified by grp and cmd.
grp | the group of the specified menu item. |
cmd | the index of the command within the group. |
Definition at line 693 of file build.c.
References GRP_CMD_TO_POINTER, NULL, and on_build_menu_item().
const gchar * build_get_current_menu_item | ( | const GeanyBuildGroup | grp, |
const guint | cmd, | ||
const GeanyBuildCmdEntries | fld | ||
) |
Get the string for the menu item field.
Get the current highest priority command specified by grp and cmd. This is the one that the menu item will use if activated.
grp | the group of the specified menu item. |
cmd | the index of the command within the group. |
fld | the field to return |
NULL
if it doesn't exist. This is a pointer to an internal structure and must not be freed. Definition at line 607 of file build.c.
References build_groups_count, GEANY_BC_CMDENTRIES_COUNT, GEANY_BC_COMMAND, GEANY_BC_LABEL, GEANY_BC_WORKING_DIR, GEANY_GBG_COUNT, get_build_cmd(), and NULL.
guint build_get_group_count | ( | const GeanyBuildGroup | grp | ) |
Get the count of commands for the group.
Get the number of commands in the group specified by grp.
grp | the group of the specified menu item. |
Definition at line 2660 of file build.c.
References build_groups_count, and GEANY_GBG_COUNT.
void build_remove_menu_item | ( | const GeanyBuildSource | src, |
const GeanyBuildGroup | grp, | ||
const gint | cmd | ||
) |
Remove the specified Build menu item.
Makes the specified menu item configuration no longer exist. This is different to setting fields to blank because the menu item will be deleted from the configuration file on saving (except the system filetypes settings
src | the source of the menu item to remove. |
grp | the group of the command to remove. |
cmd | the index (from 0) of the command within the group. A negative value will remove the whole group. |
If any parameter is out of range does nothing.
Updates the menu.
Definition at line 546 of file build.c.
References build_groups_count, get_build_group(), and NULL.
Referenced by destroy_project().
void build_set_menu_item | ( | const GeanyBuildSource | src, |
const GeanyBuildGroup | grp, | ||
const guint | cmd, | ||
const GeanyBuildCmdEntries | fld, | ||
const gchar * | val | ||
) |
Set the string for the menu item field.
Set the specified field of the command specified by src, grp and cmd.
src | the source of the menu item |
grp | the group of the specified menu item. |
cmd | the index of the menu item within the group. |
fld | the field in the menu item command to set |
val | the value to set the field to, is copied |
Definition at line 648 of file build.c.
References build_groups_count, build_menu_update(), command, GEANY_BC_CMDENTRIES_COUNT, GEANY_BC_COMMAND, GEANY_BC_LABEL, GEANY_BC_WORKING_DIR, GEANY_BCS_COUNT, GEANY_GBG_COUNT, get_build_group_pointer(), label, NULL, SETPTR, and working_dir.