2
* Copyright (C) 2010 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
19
#ifndef WINDOW_BUTTONS_H
20
#define WINDOW_BUTTONS_H
24
#include "Introspectable.h"
26
class WindowButtons : public nux::HLayout, public Introspectable
28
// These are the [close][minimize][restore] buttons on the panel when there
29
// is a maximized window
35
sigc::signal<void> close_clicked;
36
sigc::signal<void> minimize_clicked;
37
sigc::signal<void> restore_clicked;
38
sigc::signal<void> redraw_signal;
41
const gchar * GetName ();
42
const gchar * GetChildsName ();
43
void AddProperties (GVariantBuilder *builder);
46
// For testing the buttons
47
void RecvMouseDown (int x, int y, unsigned long button_flags, unsigned long key_flags);
48
void RecvMouseUp (int x, int y, unsigned long button_flags, unsigned long key_flags);
49
void RecvMouseEnter (int x, int y, unsigned long button_flags, unsigned long key_flags);
50
void RecvMouseLeave (int x, int y, unsigned long button_flags, unsigned long key_flags);
51
void RecvMouseClick (int x, int y, unsigned long button_flags, unsigned long key_flags);
52
void RecvMouseMove (int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags);
55
void OnCloseClicked ();
56
void OnMinimizeClicked ();
57
void OnRestoreClicked ();
60
nux::HLayout *_layout;