Code

Tweaked to build with g++4.1. Thanks, <garrett>.
[inkscape.git] / src / ui / previewholder.h
index 96d9b8228ab206c98748094b1f7474237adb873e..53ffd5f054dc7ea3899e6480a57b2e5ac330b004 100644 (file)
@@ -29,16 +29,30 @@ public:
 
     virtual void clear();
     virtual void addPreview( Previewable* preview );
+    virtual void freezeUpdates();
+    virtual void thawUpdates();
     virtual void setStyle(Gtk::BuiltinIconSize size, ViewType view);
+    virtual void setOrientation( Gtk::AnchorType how );
+    virtual int getColumnPref() const { return _prefCols; }
+    virtual void setColumnPref( int cols );
     virtual Gtk::BuiltinIconSize getPreviewSize() const { return _baseSize; }
     virtual ViewType getPreviewType() const { return _view; }
 
+protected:
+    virtual void on_size_allocate( Gtk::Allocation& allocation );
+    virtual void on_size_request( Gtk::Requisition* requisition );
+
+
 private:
     void rebuildUI();
+    void calcGridSize( const Gtk::Widget* thing, int itemCount, int& width, int& height );
 
     std::vector<Previewable*> items;
     Gtk::Bin *_scroller;
     Gtk::Table *_insides;
+    int _prefCols;
+    bool _updatesFrozen;
+    Gtk::AnchorType _anchor;
     Gtk::BuiltinIconSize _baseSize;
     ViewType _view;
 };