X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fpreviewholder.h;h=812d4b27d0259d77008f3e50c47e11f20cfeef80;hb=f4cd1ea9e1fd3cba85d7b167d56a1d5fc1116d91;hp=1be306ba4f289f3abde36c52704207d8ea1d3d7c;hpb=00dae6914be1188d42895800b098bc336487669d;p=inkscape.git diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h index 1be306ba4..812d4b27d 100644 --- a/src/ui/previewholder.h +++ b/src/ui/previewholder.h @@ -17,6 +17,7 @@ #include #include #include "previewfillable.h" +#include "../dialogs/eek-preview.h" namespace Inkscape { namespace UI { @@ -29,12 +30,17 @@ public: virtual void clear(); virtual void addPreview( Previewable* preview ); - virtual void setStyle(Gtk::BuiltinIconSize size, ViewType view); + virtual void freezeUpdates(); + virtual void thawUpdates(); + virtual void setStyle( ::PreviewSize size, ViewType view, guint ratio ); 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 ::PreviewSize getPreviewSize() const { return _baseSize; } virtual ViewType getPreviewType() const { return _view; } + virtual guint getPreviewRatio() const { return _ratio; } + virtual void setWrap( bool b ); + virtual bool getWrap() const { return _wrap; } protected: virtual void on_size_allocate( Gtk::Allocation& allocation ); @@ -43,14 +49,18 @@ protected: 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; + ::PreviewSize _baseSize; + guint _ratio; ViewType _view; + bool _wrap; }; } //namespace UI