fbdbg  3.0
FreeBASIC Debugger
settings.bas File Reference

Code for settings dialog. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  STYLE_SYNTAX, STYLE_LINENO, STYLE_FONT, STYLE_SCROLL,
  STYLE_COLOR, STYLE_SCHEME
}
 Enumerators for style change modi. More...
 

Functions

FUNCTION_AS_guint32 colTrans (BYVAL_AS_GdkRGBA_PTR Col)
 Transform a GdkRGBA value to guint32. More...
 
FUNCTION_AS_gchar_PTR updateScheme (BYVAL_AS_GObject_PTR_PTR Array)
 Update style scheme file. More...
 
SUB SettingsForm (BYVAL_AS_gint Mo=1)
 Populate or evaluate the settings dialog. More...
 
SUB_CDECL_ALIAS act_Settings (BYVAL_AS_GtkAction_PTR action, BYVAL_AS_gpointer user_data)
 Run the settings dialog (GtkAction id="action900") More...
 
SUB_CDECL_ALIAS on_entry_icon_save (BYVAL_AS_GtkEntry_PTR Entry, BYVAL_AS_GtkEntryIconPosition IconPos, BYVAL_AS_GdkEvent_PTR Event, BYVAL_AS_gpointer user_data)
 Signal handler for icons in GtkEntries (id="entry501", "entry502") More...
 
SUB_CDECL_ALIAS on_entry_icon_load (BYVAL_AS_GtkEntry_PTR Entry, BYVAL_AS_GtkEntryIconPosition IconPos, BYVAL_AS_GdkEvent_PTR Event, BYVAL_AS_gpointer user_data)
 Signal handler for GtkEntry (id="entry505") More...
 
SUB_CDECL_ALIAS on_settings_changed (BYVAL_AS_GObject_PTR Objct, BYVAL_AS_gpointer user_data)
 Signal handler to show changed settings. More...
 

Detailed Description

Code for settings dialog.

This file contains the source code to handle the settings dialog. ???

Since
3.0

Definition in file settings.bas.

Enumeration Type Documentation

anonymous enum

Enumerators for style change modi.

Enumerator
STYLE_SYNTAX 

Check button syntax highlighting changed.

STYLE_LINENO 

Check button line numbers changed.

STYLE_FONT 

Font button source view changed.

STYLE_SCROLL 

Scroll bar current position changed.

STYLE_COLOR 

One of the color buttons changed.

STYLE_SCHEME 

Combo box style scheme changed.

Definition at line 12 of file settings.bas.

Function Documentation

SUB_CDECL_ALIAS act_Settings ( BYVAL_AS_GtkAction_PTR  action,
BYVAL_AS_gpointer  user_data 
)

Run the settings dialog (GtkAction id="action900")

Parameters
actionThe GtkAction that triggered the signal
user_dataThe GtkWidget PTR of the dialog window

This signal handler shows the settings dialog in modal mode. Depending on the user action it either cancels all changes or reads the new data.

Todo:
Decide if we need a help button.

Definition at line 318 of file settings.bas.

Here is the call graph for this function:

FUNCTION_AS_guint32 colTrans ( BYVAL_AS_GdkRGBA_PTR  Col)

Transform a GdkRGBA value to guint32.

Parameters
ColA GdkRGBA color
Returns
The guint32 equivalent

Transform a GdkRGBA color value used in the GtkSourceView widgets in to a guint32 value used in the INI class.

Definition at line 30 of file settings.bas.

Here is the caller graph for this function:

SUB_CDECL_ALIAS on_entry_icon_load ( BYVAL_AS_GtkEntry_PTR  Entry,
BYVAL_AS_GtkEntryIconPosition  IconPos,
BYVAL_AS_GdkEvent_PTR  Event,
BYVAL_AS_gpointer  user_data 
)

Signal handler for GtkEntry (id="entry505")

Parameters
EntryThe widget that triggered the signal
IconPosThe icon position (GTK_ENTRY_ICON_PRIMARY or GTK_ENTRY_ICON_SECONDARY)
EventThe GdkEvent that triggered the signal (unused)
user_data(unused)

This signal handler pops up a file chooser dialog in "load" mode. The user can select an executable (existing files only, it's not possible to enter a name for a new file).

Todo:
Decide if we pass a GtkFileFilter as user_data in future (LINUX/non-LINUX)

Definition at line 386 of file settings.bas.

Here is the call graph for this function:

SUB_CDECL_ALIAS on_entry_icon_save ( BYVAL_AS_GtkEntry_PTR  Entry,
BYVAL_AS_GtkEntryIconPosition  IconPos,
BYVAL_AS_GdkEvent_PTR  Event,
BYVAL_AS_gpointer  user_data 
)

Signal handler for icons in GtkEntries (id="entry501", "entry502")

Parameters
EntryThe entry widget where the icon was clicked
IconPosThe icon position (GTK_ENTRY_ICON_PRIMARY or GTK_ENTRY_ICON_SECONDARY)
EventThe GdkEvent that triggered the signal (unused)
user_data(unused)

This signal handler pops up a file chooser dialog in "save" mode. The user can either select an existing file, or select a folder and enter a name for a new file.

Todo:

Decide if we pass a GtkFileFilter as user_data in future (LINUX/non-LINUX)

Decide if we enable the overwrite confirmation

Definition at line 350 of file settings.bas.

SUB_CDECL_ALIAS on_settings_changed ( BYVAL_AS_GObject_PTR  Objct,
BYVAL_AS_gpointer  user_data 
)

Signal handler to show changed settings.

Parameters
ObjctThe widget that triggered the signal
user_dataThe style scheme combo box, when triggered by a color change

This signal handler updates the style of the source view widgets in case of a parameter change in settings dialog. Only the current notebook page gets adapted, to give the user an idea of the new look.

Definition at line 416 of file settings.bas.

Here is the call graph for this function:

SUB SettingsForm ( BYVAL_AS_gint  Mo = 1)

Populate or evaluate the settings dialog.

Parameters
MoThe modus (0 = read, 1 = write)

Handle the data in the settings dialog. The SUB either

  • reads the dialog data and sets the parameter variables for the ini file, or
  • sets the dialog to ini file parameter variables

When called first, the widgets get searched in the GUI description file.

Todo:
In the SELECT CASE 0 block: replace the PRINT commands by setting your matching parameter variables
Todo:
In the SELECT CASE 1 block: replace the literals by reading from your matching parameter variables.

Definition at line 116 of file settings.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

FUNCTION_AS_gchar_PTR updateScheme ( BYVAL_AS_GObject_PTR_PTR  Array)

Update style scheme file.

Parameters
ArrayThe array of color buttons to get the colors from
Returns
Zero on success, an error message otherwise

Function to update the style scheme file fbdebugger.xml. It renames the original file and creates a new one. The context of the original file gets copied to the new file, but color declarations get replaced by the colors read from the color bottons. Finally the renamed original file gets removed.

Definition at line 49 of file settings.bas.

Here is the call graph for this function:

Here is the caller graph for this function: