Proper check for rawzor libraries.
[rawtherapee-fixes.git] / rtgui / thumbbrowserbase_old.h
blobd594be85d66455e5d684a25459612c2d451bcfed
1 /*
2 * This file is part of RawTherapee.
4 * Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
6 * RawTherapee is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * RawTherapee is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef _THUMBNAILBROWSERBASE_
20 #define _THUMBNAILBROWSERBASE_
22 #include <gtkmm.h>
23 #include <thumbbrowserentrybase.h>
25 class ThumbBrowserBase : public Gtk::DrawingArea {
27 public:
29 enum Arrangement {TB_Horizontal, TB_Vertical};
31 protected:
33 Glib::RefPtr<Gdk::GC> gc_;
35 std::vector<ThumbBrowserEntryBase*> fd;
36 std::vector<ThumbBrowserEntryBase*> selected;
37 ThumbBrowserEntryBase* lastClicked;
39 int previewHeight;
41 Glib::ustring fileInEditor;
42 Arrangement arrangement;
44 void arrangeFiles ();
46 public:
48 ThumbBrowserBase ();
50 void setPreviewHeight (int h);
51 const std::vector<ThumbBrowserEntryBase*>& getEntries () { return fd; }
52 void styleChanged (const Glib::RefPtr<Gtk::Style>& style);
53 void redraw (); // arrange files and draw area
54 void refreshAll (); // refresh thumbnail sizes, re-generate thumbnail images, arrange and draw
55 void resized (Gtk::Allocation& req);
56 void setOpenedFileName (const Glib::ustring& fname);
58 virtual void on_realize();
59 virtual bool on_expose_event(GdkEventExpose* event);
60 virtual bool on_button_press_event (GdkEventButton* event);
61 virtual bool on_button_release_event (GdkEventButton* event);
62 virtual bool on_motion_notify_event (GdkEventMotion* event);
64 void setArrangement (Arrangement a);
65 virtual bool checkFilter (ThumbBrowserEntryBase* entry) { return true; }
66 virtual void rightClicked (ThumbBrowserEntryBase* entry) {}
67 virtual void doubleClicked (ThumbBrowserEntryBase* entry) {}
71 #endif