diff --git a/src/ui/previewholder.h b/src/ui/previewholder.h
index 532aa771f91966bb0b77a8969c23b9fb93f50a1d..046cdf7c7dfbef03c5707dc5c286796d80238530 100644 (file)
--- a/src/ui/previewholder.h
+++ b/src/ui/previewholder.h
#include <gtkmm/bin.h>
#include <gtkmm/table.h>
#include "previewfillable.h"
#include <gtkmm/bin.h>
#include <gtkmm/table.h>
#include "previewfillable.h"
+#include "../icon-size.h"
namespace Inkscape {
namespace UI {
namespace Inkscape {
namespace UI {
virtual void clear();
virtual void addPreview( Previewable* preview );
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( Inkscape::IconSize size, ViewType view );
virtual void setOrientation( Gtk::AnchorType how );
virtual void setOrientation( Gtk::AnchorType how );
- virtual Gtk::BuiltinIconSize getPreviewSize() const { return _baseSize; }
+ virtual int getColumnPref() const { return _prefCols; }
+ virtual void setColumnPref( int cols );
+ virtual Inkscape::IconSize getPreviewSize() const { return _baseSize; }
virtual ViewType getPreviewType() const { return _view; }
virtual ViewType getPreviewType() const { return _view; }
+ virtual void setWrap( bool b );
+ virtual bool getWrap() const { return _wrap; }
+
+protected:
+ virtual void on_size_allocate( Gtk::Allocation& allocation );
+ virtual void on_size_request( Gtk::Requisition* requisition );
+
private:
void rebuildUI();
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;
std::vector<Previewable*> items;
Gtk::Bin *_scroller;
Gtk::Table *_insides;
+ int _prefCols;
+ bool _updatesFrozen;
Gtk::AnchorType _anchor;
Gtk::AnchorType _anchor;
- Gtk::BuiltinIconSize _baseSize;
+ Inkscape::IconSize _baseSize;
ViewType _view;
ViewType _view;
+ bool _wrap;
};
} //namespace UI
};
} //namespace UI