pavi  0.0
Map Path Viewer
track_store.bas File Reference

Source handling the tree store for tracks. More...

#include "Gir/Gtk-3.0.bi"
#include "track_layer.bi"
#include "track_store.bi"
#include "gui.bi"
Include dependency graph for track_store.bas:

Go to the source code of this file.

Functions

FUNCTION_CDECL_AS_gboolean track_store_remove (BYVAL_AS_GtkTreeModel_PTR Model, BYVAL_AS_GtkTreePath_PTR Path, BYVAL_AS_GtkTreeIter_PTR Iter, BYVAL_AS_gpointer UserData)
 Callback for unloading all tracks. More...
 
SUB TS_finalize ()
 Remove all tracks from store. More...
 
SUB TS_remove (BYVAL_AS_GtkTreeIter_PTR Child)
 Remove a track from store. More...
 
SUB TS_select (BYVAL_AS_STRING Path)
 Handle new selection. More...
 
SUB TS_preference (BYVAL_AS_TrackLoader_PTR Loa)
 Open the preference dialog. More...
 

Detailed Description

Source handling the tree store for tracks.

The track data is stored in a GtkTreeStore. The source in this file handles the tree store operations.

Since
0.0

Definition in file track_store.bas.

Function Documentation

◆ track_store_remove()

FUNCTION_CDECL_AS_gboolean track_store_remove ( BYVAL_AS_GtkTreeModel_PTR  Model,
BYVAL_AS_GtkTreePath_PTR  Path,
BYVAL_AS_GtkTreeIter_PTR  Iter,
BYVAL_AS_gpointer  UserData 
)

Callback for unloading all tracks.

Parameters
Modeltree model
Pathline in Model
Iteriter in Model
UserDataunused
Returns
FALSE (in order to continue)

This function is designed as a gtk_tree_model_foreach callback. It checks if the tree store line contains a TrackLoader (DELETEing that instance) or gchararray pointers (g_free() that memory).

Since
0.0

Definition at line 134 of file track_store.bas.

Here is the caller graph for this function:

◆ TS_finalize()

SUB TS_finalize ( )

Remove all tracks from store.

Function checking each store row: in case of a track (no folder) it DELETEs the TrackLoader instance and frees the gchararray memory. Finally it clears the remaining folder entries.

Since
0.0

Definition at line 165 of file track_store.bas.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TS_remove()

SUB TS_remove ( BYVAL_AS_GtkTreeIter_PTR  Child)

Remove a track from store.

Parameters
ChildThe iter where to find the track

Procedure to remove a single track from the store, DELETEing the TrackLoader structure.

Since
0.0

Definition at line 182 of file track_store.bas.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TS_select()

SUB TS_select ( BYVAL_AS_STRING  Path)

Handle new selection.

Parameters
PathThe path in the tree model as STRING

This procedure handles a selection change in the tree model. The priviously seleted radio button (if any) gets inactive, and the new one gets active.

Note
We don't use the GtkTreeSelection since it marks the selected row with a blue bar, overriding the bachground color we want to see.
Since
0.0

Definition at line 332 of file track_store.bas.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TS_preference()

SUB TS_preference ( BYVAL_AS_TrackLoader_PTR  Loa)

Open the preference dialog.

Parameters
LoaThe track to open for

This procedure handles the preference dialog for a track, loading its parameters in the user interface and providing the dialog to the user. On OK button it reads the new values from the user interface mask and stores them in the track store model.

Since
0.0

Definition at line 368 of file track_store.bas.

Here is the call graph for this function:
Here is the caller graph for this function: