#ifndef CHROME_BROWSER_UI_GTK_PANELS_PANEL_STACK_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_GTK_PANELS_PANEL_STACK_WINDOW_GTK_H_
#include <gtk/gtk.h>
#include <list>
#include <map>
#include "chrome/browser/ui/panels/native_panel_stack_window.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/base/x/active_window_watcher_x_observer.h"
class PanelStackWindowGtk : public NativePanelStackWindow,
public ui::ActiveWindowWatcherXObserver {
public:
explicit PanelStackWindowGtk(NativePanelStackWindowDelegate* delegate);
virtual ~PanelStackWindowGtk();
protected:
virtual void Close() OVERRIDE;
virtual void AddPanel(Panel* panel) OVERRIDE;
virtual void RemovePanel(Panel* panel) OVERRIDE;
virtual void MergeWith(NativePanelStackWindow* another) OVERRIDE;
virtual bool IsEmpty() const OVERRIDE;
virtual bool HasPanel(Panel* panel) const OVERRIDE;
virtual void MovePanelsBy(const gfx::Vector2d& delta) OVERRIDE;
virtual void BeginBatchUpdatePanelBounds(bool animate) OVERRIDE;
virtual void AddPanelBoundsForBatchUpdate(Panel* panel,
const gfx::Rect& bounds) OVERRIDE;
virtual void EndBatchUpdatePanelBounds() OVERRIDE;
virtual bool IsAnimatingPanelBounds() const OVERRIDE;
virtual void Minimize() OVERRIDE;
virtual bool IsMinimized() const OVERRIDE;
virtual void DrawSystemAttention(bool draw_attention) OVERRIDE;
virtual void OnPanelActivated(Panel* panel) OVERRIDE;
private:
typedef std::list<Panel*> Panels;
virtual void ActiveWindowChanged(GdkWindow* active_window) OVERRIDE;
CHROMEGTK_CALLBACK_1(PanelStackWindowGtk, gboolean, OnWindowDeleteEvent,
GdkEvent*);
CHROMEGTK_CALLBACK_1(PanelStackWindowGtk, gboolean, OnWindowState,
GdkEventWindowState*);
void EnsureWindowCreated();
void SetStackWindowBounds();
typedef std::map<Panel*, gfx::Rect> BoundsUpdates;
NativePanelStackWindowDelegate* delegate_;
GtkWindow* window_;
Panels panels_;
bool is_minimized_;
bool bounds_updates_started_;
BoundsUpdates bounds_updates_;
DISALLOW_COPY_AND_ASSIGN(PanelStackWindowGtk);
};
#endif