#ifndef LAYOUT_H
#define LAYOUT_H
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include "options.h"
+#include "typedefs.h"
+
+struct AnimationData;
+struct FileData;
+struct FullScreenData;
+struct ImageWindow;
+struct SlideShowData;
+struct ViewDir;
+struct ViewFile;
+
#define LAYOUT_ID_CURRENT "_current_"
+#define MAX_SPLIT_IMAGES 4
extern GList *layout_window_list;
+enum LayoutLocation {
+ LAYOUT_HIDE = 0,
+ LAYOUT_LEFT = 1 << 0,
+ LAYOUT_RIGHT = 1 << 1,
+ LAYOUT_TOP = 1 << 2,
+ LAYOUT_BOTTOM = 1 << 3
+};
+
+struct LayoutWindow
+{
+ LayoutOptions options;
+
+ FileData *dir_fd;
+
+ /* base */
+
+ GtkWidget *window;
+
+ GtkWidget *main_box;
+
+ GtkWidget *group_box;
+ GtkWidget *h_pane;
+ GtkWidget *v_pane;
+
+ /* menus, path selector */
+
+ GtkActionGroup *action_group;
+ GtkActionGroup *action_group_editors;
+ guint ui_editors_id;
+ GtkUIManager *ui_manager;
+ guint toolbar_merge_id[TOOLBAR_COUNT];
+ GList *toolbar_actions[TOOLBAR_COUNT];
+
+ GtkWidget *path_entry;
+
+ /* image */
+
+ LayoutLocation image_location;
+
+ ImageWindow *image;
+
+ ImageWindow *split_images[MAX_SPLIT_IMAGES];
+ ImageSplitMode split_mode;
+ gint active_split_image;
+
+ GtkWidget *split_image_widget;
+ GtkSizeGroup *split_image_sizegroup;
+
+ /* tools window (float) */
+
+ GtkWidget *tools;
+ GtkWidget *tools_pane;
+
+ GtkWidget *menu_tool_bar; /**< Combined menu and toolbar box */
+ GtkWidget *menu_bar; /**< referenced by lw, exist during whole lw lifetime */
+ /* toolbar */
+
+ GtkWidget *toolbar[TOOLBAR_COUNT]; /**< referenced by lw, exist during whole lw lifetime */
+
+ GtkWidget *back_button;
+
+ /* dir view */
+
+ LayoutLocation dir_location;
+
+ ViewDir *vd;
+ GtkWidget *dir_view;
+
+ /* file view */
+
+ LayoutLocation file_location;
+
+ ViewFile *vf;
+
+ GtkWidget *file_view;
+
+ GtkWidget *info_box; /**< status bar */
+ GtkWidget *info_progress_bar; /**< status bar */
+ GtkWidget *info_sort; /**< status bar */
+ GtkWidget *info_status; /**< status bar */
+ GtkWidget *info_details; /**< status bar */
+ GtkWidget *info_zoom; /**< status bar */
+ GtkWidget *info_pixel; /**< status bar */
+
+ /* slide show */
+
+ SlideShowData *slideshow;
+
+ /* full screen */
+
+ FullScreenData *full_screen;
+
+ /* misc */
+
+ GtkWidget *utility_box; /**< referenced by lw, exist during whole lw lifetime */
+ GtkWidget *utility_paned; /**< between image and bar */
+ GtkWidget *bar_sort;
+ GtkWidget *bar;
+
+ gboolean bar_sort_enabled; /**< Set during start-up, and checked when the editors have loaded */
+
+ GtkWidget *exif_window;
+ GtkWidget *sar_window; /**< Search and Run window */
+
+ AnimationData *animation;
+
+ GtkWidget *log_window;
+};
+
LayoutWindow *layout_new(FileData *dir_fd, LayoutOptions *lop);
LayoutWindow *layout_new_with_geometry(FileData *dir_fd, LayoutOptions *lop,
const gchar *geometry);
LayoutWindow *layout_find_by_image(ImageWindow *imd);
LayoutWindow *layout_find_by_image_fd(ImageWindow *imd);
LayoutWindow *layout_find_by_layout_id(const gchar *id);
-
+gint layout_compare_options_id(const LayoutWindow *lw, const gchar *id);
const gchar *layout_get_path(LayoutWindow *lw);
gboolean layout_set_path(LayoutWindow *lw, const gchar *path);
FileData *layout_list_get_fd(LayoutWindow *lw, gint index);
gint layout_list_get_index(LayoutWindow *lw, FileData *fd);
void layout_list_sync_fd(LayoutWindow *lw, FileData *fd);
+GString *layout_get_window_list();
GList *layout_selection_list(LayoutWindow *lw);
/* return list of pointers to int for selection */
void layout_tools_hide_toggle(LayoutWindow *lw);
-void layout_toolbar_toggle(LayoutWindow *lw);
+void layout_selectable_toolbars_toggle(LayoutWindow *lw);
void layout_info_pixel_set(LayoutWindow *lw, gboolean show);
void layout_split_change(LayoutWindow *lw, ImageSplitMode mode);
void save_layout(LayoutWindow *lw);
gchar *layout_get_unique_id();
+guint layout_window_count();
+
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */