2
* This file is part of the apvlv package
4
* Copyright (C) 2008 Alf.
6
* Contact: Alf <naihe2010@gmail.com>
8
* This program is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* as published by the Free Software Foundation; either version 2.0 of
11
* the License, or (at your option) any later version.
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public
19
* License along with this program; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
/* @CFILE ApvlvDir.hpp
25
* Author: Alf <naihe2010@gmail.com>
27
/* @date Created: 2009/01/03 23:27:52 Alf*/
33
# include "config.hpp"
36
#include "ApvlvCore.hpp"
37
#include "ApvlvWindow.hpp"
46
ApvlvDirNode (bool isdir, const char *, const char *);
50
// Get the destination
51
bool dest (const char **realpath, int *pagenum);
54
gint mPagenum; /* -1 means dir, 0 means file, > 0 means page num */
60
class ApvlvDirStatus: public ApvlvCoreStatus
63
ApvlvDirStatus (ApvlvDir *);
67
void active (bool act);
69
void setsize (int, int);
75
#define AD_STATUS_SIZE 4
76
GtkWidget *mStlab[AD_STATUS_SIZE];
79
class ApvlvDir: public ApvlvCore
82
ApvlvDir (int w, int h);
86
bool loadfile (const char *file, bool check = true);
88
void setactive (bool act);
90
returnType process (int times, guint keyval);
94
returnType subprocess (int ct, guint key);
98
bool enter (guint key);
100
void scrollup (int times);
102
void scrolldown (int times);
104
void scrollleft (int times);
106
void scrollright (int times);
108
static void apvlv_dir_on_changed (GtkTreeSelection *, ApvlvDir *);
110
bool walk_poppler_iter_index (GtkTreeIter *titr, PopplerIndexIter *iter);
112
bool walk_dir_path_index (GtkTreeIter *titr, const char *path);
114
static gboolean apvlv_dir_first_select_cb (ApvlvDir *);
118
PopplerDocument *mDoc;
123
GtkTreeStore *mStore;
124
GtkTreeIter mPrevIter, mCurrentIter;
125
GtkTreeSelection *mSelection;