root/src/filemanager/layout.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /** \file layout.h
   2  *  \brief Header: panel layout module
   3  */
   4 
   5 #ifndef MC__LAYOUT_H
   6 #define MC__LAYOUT_H
   7 
   8 #include "lib/global.h"
   9 #include "lib/widget.h"
  10 
  11 #include "panel.h"
  12 
  13 /*** typedefs(not structures) and defined constants **********************************************/
  14 
  15 typedef enum
  16 {
  17     view_listing = 0,           /* Directory listing */
  18     view_info = 1,              /* Information panel */
  19     view_tree = 2,              /* Tree view */
  20     view_quick = 3,             /* Quick view */
  21     view_nothing = 4,           /* Undefined */
  22 } panel_view_mode_t;
  23 
  24 /*** enums ***************************************************************************************/
  25 
  26 /*** structures declarations (and typedefs of structures)*****************************************/
  27 
  28 typedef struct
  29 {
  30     gboolean horizontal_split;
  31 
  32     /* vertical split */
  33     gboolean vertical_equal;
  34     int left_panel_size;
  35 
  36     /* horizontal split */
  37     gboolean horizontal_equal;
  38     int top_panel_size;
  39 } panels_layout_t;
  40 
  41 /*** global variables defined in .c file *********************************************************/
  42 
  43 extern int output_lines;
  44 extern gboolean command_prompt;
  45 extern gboolean menubar_visible;
  46 extern int output_start_y;
  47 extern gboolean xterm_title;
  48 extern gboolean free_space;
  49 extern gboolean nice_rotating_dash;
  50 
  51 extern int ok_to_refresh;
  52 
  53 extern panels_layout_t panels_layout;
  54 
  55 /*** declarations of public functions ************************************************************/
  56 void layout_change (void);
  57 void layout_box (void);
  58 void panel_update_cols (Widget * widget, panel_display_t frame_size);
  59 void setup_panels (void);
  60 void panels_split_equal (void);
  61 void panels_split_more (void);
  62 void panels_split_less (void);
  63 void destroy_panels (void);
  64 void setup_cmdline (void);
  65 void create_panel (int num, panel_view_mode_t type);
  66 void swap_panels (void);
  67 panel_view_mode_t get_panel_type (int idx);
  68 MC_MOCKABLE panel_view_mode_t get_current_type (void);
  69 panel_view_mode_t get_other_type (void);
  70 int get_current_index (void);
  71 int get_other_index (void);
  72 const char *get_nth_panel_name (int num);
  73 
  74 Widget *get_panel_widget (int idx);
  75 
  76 WPanel *get_other_panel (void);
  77 
  78 void save_panel_dir (int idx);
  79 char *get_panel_dir_for (const WPanel * widget);
  80 
  81 void set_hintbar (const char *str);
  82 
  83 /* Rotating dash routines */
  84 void use_dash (gboolean flag);  /* Disable/Enable rotate_dash routines */
  85 void rotate_dash (gboolean show);
  86 
  87 #ifdef ENABLE_SUBSHELL
  88 gboolean do_load_prompt (void);
  89 int load_prompt (int fd, void *unused);
  90 #endif
  91 
  92 void update_xterm_title_path (void);
  93 void update_terminal_cwd (void);
  94 
  95 void title_path_prepare (char **path, char **login);
  96 
  97 /*** inline functions ****************************************************************************/
  98 
  99 #endif /* MC__LAYOUT_H */

/* [previous][next][first][last][top][bottom][index][help]  */