![]() |
![]() |
![]() |
Libfm Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
struct FmSidePane; struct FmSidePaneClass; enum FmSidePaneMode; void (*FmSidePaneUpdatePopup) (FmSidePane *sp
,GtkUIManager *ui
,GtkActionGroup *act_grp
,FmFileInfo *file
,gpointer user_data
); void fm_side_pane_chdir (FmSidePane *sp
,FmPath *path
); FmPath * fm_side_pane_get_cwd (FmSidePane *sp
); FmSidePaneMode fm_side_pane_get_mode (FmSidePane *sp
); FmSidePaneMode fm_side_pane_get_mode_by_name (const char *str
); const char * fm_side_pane_get_mode_label (FmSidePaneMode mode
); const char * fm_side_pane_get_mode_name (FmSidePaneMode mode
); const char * fm_side_pane_get_mode_tooltip (FmSidePaneMode mode
); gint fm_side_pane_get_n_modes (void
); GtkWidget * fm_side_pane_get_title_bar (FmSidePane *sp
); FmSidePane * fm_side_pane_new (void
); gboolean fm_side_pane_set_home_dir (FmSidePane *sp
,const char *home_dir
); void fm_side_pane_set_mode (FmSidePane *sp
,FmSidePaneMode mode
); void fm_side_pane_set_popup_updater (FmSidePane *sp
,FmSidePaneUpdatePopup update_popup
,gpointer user_data
); gboolean fm_side_pane_set_show_hidden (FmSidePane *sp
,gboolean show_hidden
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----FmSidePane
include
: libfm/fm-gtk.h
The FmSidePane widget displays side pane for fast navigation across places.
struct FmSidePaneClass { GtkVBoxClass parent_class; void (*chdir)(FmSidePane* sp, guint button, FmPath* path); void (*mode_changed)(FmSidePane* sp); };
the parent class | |
the class closure for the "chdir" signal | |
the class closure for the "mode-changed" signal |
typedef enum { FM_SP_NONE, FM_SP_PLACES, FM_SP_DIR_TREE, FM_SP_REMOTE } FmSidePaneMode;
Mode of side pane view.
invalid mode | |
FmPlacesView mode | |
FmDirTreeView mode | |
reserved mode |
void (*FmSidePaneUpdatePopup) (FmSidePane *sp
,GtkUIManager *ui
,GtkActionGroup *act_grp
,FmFileInfo *file
,gpointer user_data
);
The callback to update popup menu. It can disable items of menu, add
some new, replace actions, etc. depending of the window and files.
In some cases file
may be incomplete so callback should check that.
|
the side pane widget |
|
the object to add interface |
|
group of actions to add action |
|
the file the popup menu was created for |
|
pointer passed to fm_side_pane_set_popup_updater()
|
void fm_side_pane_chdir (FmSidePane *sp
,FmPath *path
);
Changes active path in the side pane.
|
a widget to apply |
|
new path |
Since 0.1.12
FmPath * fm_side_pane_get_cwd (FmSidePane *sp
);
Retrieves current active path in the side pane. Returned data are owned by side pane and should not be freed by caller.
|
a widget to inspect |
Returns : |
active file path. |
Since 0.1.12
FmSidePaneMode fm_side_pane_get_mode (FmSidePane *sp
);
Retrieves side pane view mode.
|
a widget to inspect |
Returns : |
current view mode. |
Since 0.1.12
FmSidePaneMode fm_side_pane_get_mode_by_name (const char *str
);
Finds mode which have an associated name equal to str
.
|
the name of mode |
Returns : |
mode or FM_SP_NONE if str specifies invalid mode. |
Since 1.2.0
const char * fm_side_pane_get_mode_label (FmSidePaneMode mode
);
Retrieves label for mode
which can be used in menus. Returned
data should not be freed by caller.
|
the view mode |
Returns : |
desription or NULL if mode is invalid. |
Since 1.2.0
const char * fm_side_pane_get_mode_name (FmSidePaneMode mode
);
Retrieves the name of the specified side pane mode
, or NULL
if mode
is invalid. The name of mode may be used for config save or another
similar purpose. Returned data are owned by implementation and should
be not freed by caller.
|
mode to convert |
Returns : |
the name associated with mode . |
Since 1.2.0
const char * fm_side_pane_get_mode_tooltip (FmSidePaneMode mode
);
Retrieves tooltip for mode
which can be used in menus. Returned
data should not be freed by caller.
|
the view mode |
Returns : |
desription or NULL if mode is invalid. |
Since 1.2.0
gint fm_side_pane_get_n_modes (void
);
Tests how many view modes are known to create FmSidePane widget. The returned value is the highest FmSidePaneMode that can be used due to historical reasons since FmSidePaneMode equal to 0 is invalid.
Returns : |
number of known modes for side pane. |
Since 1.2.0
GtkWidget * fm_side_pane_get_title_bar (FmSidePane *sp
);
Retrieves side pane title bar widget.
|
a widget to inspect |
Returns : |
pointer to title bar of side pane. [transfer none] |
Since 0.1.14
FmSidePane * fm_side_pane_new (void
);
Creates new side pane.
Returns : |
a new FmSidePane widget. [transfer full] |
Since 0.1.12
gboolean fm_side_pane_set_home_dir (FmSidePane *sp
,const char *home_dir
);
Changes path used by side pane view for "Home" items if view mode has any such items.
|
a widget to apply |
|
a new path to set |
Returns : |
TRUE if current side pane mode accepts this change. |
Since 1.2.0
void fm_side_pane_set_mode (FmSidePane *sp
,FmSidePaneMode mode
);
Changes side pane view mode.
|
a widget to apply |
|
new mode for the side pane |
Since 0.1.12
void fm_side_pane_set_popup_updater (FmSidePane *sp
,FmSidePaneUpdatePopup update_popup
,gpointer user_data
);
Sets up the callback to update context menu on any item in the sidebar widget.
|
a widget to set |
|
a callback to update popup. [allow-none] |
|
user data supplied for callback |
Since 1.2.0
gboolean fm_side_pane_set_show_hidden (FmSidePane *sp
,gboolean show_hidden
);
Changes visibility of hidden files in side pane sp
.
|
a widget to apply |
|
TRUE to show hidden files in side pane |
Returns : |
TRUE if current side pane mode accepts this change. |
Since 1.2.0
"chdir"
signalvoid user_function (FmSidePane *pane,
guint button,
gpointer path,
gpointer user_data) : Run Last
The "chdir" signal is emitted when current selected
directory in the pane
is changed.
|
the widget which emitted the signal |
|
the button path was activated with |
|
(FmPath *) new directory path |
|
user data set when the signal handler was connected. |
Since 0.1.12
"mode-changed"
signalvoid user_function (FmSidePane *pane,
gpointer user_data) : Run Last
The "mode-changed" signal is emitted when view mode in the pane is changed.
|
the widget which emitted the signal |
|
user data set when the signal handler was connected. |
Since 0.1.12