X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fui%2Fpreviewholder.h;h=53ffd5f054dc7ea3899e6480a57b2e5ac330b004;hb=31841a4db29938aca3f0e06a90d00507dd937b5a;hp=96d9b8228ab206c98748094b1f7474237adb873e;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h index 96d9b8228..53ffd5f05 100644 --- a/src/ui/previewholder.h +++ b/src/ui/previewholder.h @@ -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 items; Gtk::Bin *_scroller; Gtk::Table *_insides; + int _prefCols; + bool _updatesFrozen; + Gtk::AnchorType _anchor; Gtk::BuiltinIconSize _baseSize; ViewType _view; };