~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/WindowButtons.h

  • Committer: Michael Terry
  • Date: 2010-12-17 14:07:11 UTC
  • mfrom: (724 unity)
  • mto: This revision was merged to the branch mainline in revision 743.
  • Revision ID: mike@mterry.name-20101217140711-qlij3bxdjuq1xoph
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010 Canonical Ltd
 
3
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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/>.
 
15
 *
 
16
 * Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
 
17
 */
 
18
 
 
19
#ifndef WINDOW_BUTTONS_H
 
20
#define WINDOW_BUTTONS_H
 
21
 
 
22
#include <Nux/View.h>
 
23
 
 
24
#include "Introspectable.h"
 
25
 
 
26
class WindowButtons : public nux::HLayout, public Introspectable
 
27
{
 
28
  // These are the [close][minimize][restore] buttons on the panel when there
 
29
  // is a maximized window
 
30
 
 
31
public:
 
32
  WindowButtons ();
 
33
  ~WindowButtons ();
 
34
 
 
35
  sigc::signal<void> close_clicked;
 
36
  sigc::signal<void> minimize_clicked;
 
37
  sigc::signal<void> restore_clicked;
 
38
  sigc::signal<void> redraw_signal;
 
39
 
 
40
protected:
 
41
  const gchar * GetName ();
 
42
  const gchar * GetChildsName ();
 
43
  void          AddProperties (GVariantBuilder *builder);
 
44
 
 
45
 
 
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);
 
53
 
 
54
private:
 
55
  void OnCloseClicked ();
 
56
  void OnMinimizeClicked ();
 
57
  void OnRestoreClicked ();
 
58
 
 
59
private:
 
60
  nux::HLayout *_layout;
 
61
};
 
62
 
 
63
#endif