~ubuntu-branches/ubuntu/utopic/pgadmin3/utopic-proposed

« back to all changes in this revision

Viewing changes to pgadmin/include/ctl/ctlMenuToolbar.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2011-06-07 23:03:54 UTC
  • mfrom: (1.3.1 upstream) (13 sid)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110607230354-3td4j9y71u4ahcvj
Tags: 1.14.0~beta1-1
* New upstream development release, adding Build-Depends on
  postgresql-server-dev-all >= 117~.
* Add Build-Depends on quilt, (un)patch to debian/rules and patch for fixing
  the include for kwlist.h in pgadmin/db/keywords.c.
* Add pg_config --includedir-server output to CPPFLAGS.
* Remove unrecognized configure options: --with-wx-config,
  --with-pgsql-include, --enable-gtk2, --enable-unicode.
* Clean up manually the files that are left behind after the broken
  distclean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//////////////////////////////////////////////////////////////////////////
2
2
//
3
3
// pgAdmin III - PostgreSQL Tools
4
 
// 
5
 
// Copyright (C) 2002 - 2010, The pgAdmin Development Team
 
4
//
 
5
// Copyright (C) 2002 - 2011, The pgAdmin Development Team
6
6
// This software is released under the PostgreSQL Licence
7
7
//
8
8
// ctlMenuToolbar.h - Menu tool bar
9
9
//
10
 
// This code is essentially stolen (with the authors permission) from 
 
10
// This code is essentially stolen (with the authors permission) from
11
11
// Paul Nelson (http://www.pnelsoncomposer.com/)
12
12
//
13
13
//////////////////////////////////////////////////////////////////////////
20
20
// ctlMenuButton - Can be used wherever you can use a standard wxBitmapButton
21
21
//
22
22
// Implements a small pull-down triangle (v), which, when clicked, will display
23
 
// a pop-up menu. 
 
23
// a pop-up menu.
24
24
 
25
25
class ctlMenuButton : public wxBitmapButton
26
26
{
27
27
public:
28
 
    ctlMenuButton(wxToolBar *toolBar, int ID, wxMenu *menu)  { Create(toolBar, toolBar, ID, menu); }
29
 
    void DoProcessLeftClick(wxMouseEvent& event);
30
 
 
31
 
    wxMenu *m_menu;
32
 
 
33
 
    void FillMenu();
 
28
        ctlMenuButton(wxToolBar *toolBar, int ID, wxMenu *menu)
 
29
        {
 
30
                Create(toolBar, toolBar, ID, menu);
 
31
        }
 
32
        void DoProcessLeftClick(wxMouseEvent &event);
 
33
 
 
34
        wxMenu *m_menu;
 
35
 
 
36
        void FillMenu();
34
37
 
35
38
private:
36
 
    void Create(wxWindow *window, wxToolBar *toolBar, int ID, wxMenu *menu);
37
 
    wxToolBar *m_toolBar;
 
39
        void Create(wxWindow *window, wxToolBar *toolBar, int ID, wxMenu *menu);
 
40
        wxToolBar *m_toolBar;
38
41
};
39
42
 
40
43
 
45
48
class ctlMenuTool
46
49
{
47
50
public:
48
 
    ctlMenuTool(wxToolBarToolBase *new_tool, int toolId);
49
 
    wxToolBarToolBase *m_tool;
50
 
    wxMenu *m_menu;
51
 
        
 
51
        ctlMenuTool(wxToolBarToolBase *new_tool, int toolId);
 
52
        wxToolBarToolBase *m_tool;
 
53
        wxMenu *m_menu;
 
54
 
52
55
private:
53
 
    int m_toolId;
54
 
    ctlMenuButton *m_button;
 
56
        int m_toolId;
 
57
        ctlMenuButton *m_button;
55
58
};
56
59
 
57
60
WX_DECLARE_LIST(ctlMenuTool, ctlMenuToolList);
60
63
// *** ctlMenuToolbar  -  A replacement for wxToolBar which implements menu buttons
61
64
//                       and pull-down buttons
62
65
//
63
 
// A menu button is a standard looking toolbar tool which, when clicked, pops up a 
 
66
// A menu button is a standard looking toolbar tool which, when clicked, pops up a
64
67
// menu which can be selected.
65
68
//
66
69
// A pull-down button presents a small black triangle which, when clicked, pops up
70
73
class ctlMenuToolbar : public wxToolBar
71
74
{
72
75
public:
73
 
    ctlMenuToolbar();
74
 
    ctlMenuToolbar(wxFrame* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, const wxString& name = wxPanelNameStr);
75
 
    ~ctlMenuToolbar();
 
76
        ctlMenuToolbar();
 
77
        ctlMenuToolbar(wxFrame *parent, wxWindowID id, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTB_HORIZONTAL | wxNO_BORDER, const wxString &name = wxPanelNameStr);
 
78
        ~ctlMenuToolbar();
76
79
 
77
 
    // NOTE:  label, shortHelpString, are not implemented on all platforms and are only 
78
 
    //        included for possible future upgrades
79
 
    ctlMenuButton *AddMenuPulldownTool(int toolId, const wxString& label, const wxString& shortHelpString = wxEmptyString, wxMenu *popupmenu=0);
80
 
    void DoProcessLeftClick(wxMouseEvent& event);
 
80
        // NOTE:  label, shortHelpString, are not implemented on all platforms and are only
 
81
        //        included for possible future upgrades
 
82
        ctlMenuButton *AddMenuPulldownTool(int toolId, const wxString &label, const wxString &shortHelpString = wxEmptyString, wxMenu *popupmenu = 0);
 
83
        void DoProcessLeftClick(wxMouseEvent &event);
81
84
 
82
85
private:
83
 
    wxFrame *m_frame;
84
 
    ctlMenuToolList *m_menuTools;
 
86
        wxFrame *m_frame;
 
87
        ctlMenuToolList *m_menuTools;
85
88
};
86
89
 
87
90
#endif