diff -r 6aeb7a756187 -r 3c88a81ff781 ginebra2/ContentViews/WindowsView.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ginebra2/ContentViews/WindowsView.h Fri Oct 15 17:30:59 2010 -0400 @@ -0,0 +1,60 @@ +/* + * WindowsView.h + * + * Created on: Jun 11, 2010 + * Author: lewontin + */ + +#ifndef WINDOWSVIEW_H +#define WINDOWSVIEW_H_ + +#include "controllableviewimpl.h" +#include + +namespace WRT { + class WrtBrowserContainer; +} + +namespace GVA { + +class BrowserWindow; +class ChromeWidget; +class GWebContentView; + +class WindowsView : public ControllableViewBase +{ + Q_OBJECT + + public: + WindowsView(ChromeWidget * chrome, QObject * parent = 0, const QString &objectName = QString::null); + virtual ~WindowsView(); + //Reimplement ControllableViewBase methods + static QString Type() { return "windowView"; } + virtual QString type() const { return Type(); } + QGraphicsWidget* widget() const { return 0; } + virtual QList getContext(){ return QList(); } + virtual void show(){;} + virtual void hide(){;} + virtual void activate(BrowserWindow * window); + virtual void deactivate(BrowserWindow * window); + //WindowView methods + BrowserWindow * addWindow(WRT::WrtBrowserContainer * page); + BrowserWindow * currentWindow(){ return m_current; } + void addPage(); + void handlePageEvents(bool handle); + void setMenu(QMenu * menu); + void setMenuEnabled(bool enabled); + bool isMenuEnabled() const; + GWebContentView * contentView(); + public slots: + void onPageCreated(WRT::WrtBrowserContainer * page); + void onPageDeleted(WRT::WrtBrowserContainer * page); + void onWindowAction(); //Handle menu add window action + private: + QMap m_windows; + BrowserWindow * m_current; + ChromeWidget * m_chrome; + QMenu * m_menu; //Shared menu, not owned +}; +} +#endif /* WINDOWSVIEW_H_ */