Fix coding nits.

- enums shouldn't be DLL-exported,
- Placement of "{"
- Always have dtor of wxGuage and wxFrame.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2014-09-10 14:57:20 +00:00
parent cf5b3021c6
commit 0c6b03c392
10 changed files with 53 additions and 40 deletions

View File

@@ -24,15 +24,14 @@
#define wxGA_HORIZONTAL wxHORIZONTAL
#define wxGA_VERTICAL wxVERTICAL
// Available since Windows 7 only. With this style, the value of guage will
// reflect on the taskbar button.
#define wxGA_PROGRESS 0x0010
// Win32 only, is default (and only) on some other platforms
#define wxGA_SMOOTH 0x0020
// QT only, display current completed percentage (text default format "%p%")
#define wxGA_TEXT 0x0040
#if wxUSE_TASKBARBUTTON
#define wxGA_PROGRESS 0x0010
#endif
// GTK and Mac always have native implementation of the indeterminate mode
// wxMSW has native implementation only if comctl32.dll >= 6.00
#if !defined(__WXGTK20__) && !defined(__WXMAC__)

View File

@@ -40,9 +40,7 @@ public:
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_FRAME_STYLE,
const wxString& name = wxFrameNameStr);
#if wxUSE_TASKBARBUTTON
virtual ~wxFrame();
#endif
// implement base class pure virtuals
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);

View File

@@ -37,9 +37,7 @@ public:
(void)Create(parent, id, range, pos, size, style, validator, name);
}
#if wxUSE_TASKBARBUTTON
virtual ~wxGauge();
#endif
bool Create(wxWindow *parent,
wxWindowID id,

View File

@@ -10,9 +10,10 @@
#ifndef _WX_MSW_TASKBARBUTTON_H_
#define _WX_MSW_TASKBARBUTTON_H_
#include "wx/defs.h"
#if wxUSE_TASKBARBUTTON
#include "wx/defs.h"
#include "wx/vector.h"
#include "wx/taskbarbutton.h"
@@ -62,6 +63,8 @@ private:
int m_progressRange;
bool m_hasInitThumbnailToolbar;
wxDECLARE_NO_COPY_CLASS(wxTaskBarButtonImpl);
};
#endif // wxUSE_TASKBARBUTTON

View File

@@ -11,9 +11,12 @@
#ifndef _WX_TASKBARBUTTON_H_
#define _WX_TASKBARBUTTON_H_
#include "wx/defs.h"
#if wxUSE_TASKBARBUTTON
#include "wx/defs.h"
#include "wx/icon.h"
#include "wx/string.h"
class WXDLLIMPEXP_FWD_CORE wxTaskBarButton;
class WXDLLIMPEXP_FWD_CORE wxTaskBarJumpListCategory;
@@ -27,7 +30,7 @@ class WXDLLIMPEXP_FWD_CORE wxTaskBarJumpListImpl;
/**
State of the task bar button.
*/
enum WXDLLIMPEXP_CORE wxTaskBarButtonState
enum wxTaskBarButtonState
{
wxTASKBAR_BUTTON_NO_PROGRESS = 0,
wxTASKBAR_BUTTON_INDETERMINATE = 1,
@@ -36,9 +39,12 @@ enum WXDLLIMPEXP_CORE wxTaskBarButtonState
wxTASKBAR_BUTTON_PAUSED = 8
};
class WXDLLIMPEXP_CORE wxThumbBarButton : public wxObject {
class WXDLLIMPEXP_CORE wxThumbBarButton : public wxObject
{
public:
wxThumbBarButton() : m_taskBarButtonParent(NULL) { }
wxThumbBarButton() : m_taskBarButtonParent(NULL)
{ }
wxThumbBarButton(int id,
const wxIcon& icon,
const wxString& tooltip = wxString(),
@@ -48,8 +54,6 @@ public:
bool shown = true,
bool interactive = true);
virtual ~wxThumbBarButton() {}
bool Create(int id,
const wxIcon& icon,
const wxString& tooltip = wxString(),
@@ -96,7 +100,7 @@ private:
bool m_interactive;
wxTaskBarButton *m_taskBarButtonParent;
DECLARE_DYNAMIC_CLASS(wxThumbBarButton)
wxDECLARE_DYNAMIC_CLASS(wxThumbBarButton);
};
class WXDLLIMPEXP_CORE wxTaskBarButton
@@ -141,9 +145,11 @@ private:
WXWidget m_parent;
int m_maxValue;
wxTaskBarButton* m_taskBarButton;
wxDECLARE_NO_COPY_CLASS(wxAppProgressIndicator);
};
enum WXDLLIMPEXP_CORE wxTaskBarJumpListItemType
enum wxTaskBarJumpListItemType
{
wxTASKBAR_JUMP_LIST_SEPARATOR,
wxTASKBAR_JUMP_LIST_TASK,
@@ -188,6 +194,8 @@ private:
wxString m_tooltip;
wxString m_iconPath;
int m_iconIndex;
wxDECLARE_NO_COPY_CLASS(wxTaskBarJumpListItem);
};
typedef wxVector<wxTaskBarJumpListItem*> wxTaskBarJumpListItems;
@@ -217,6 +225,8 @@ private:
wxTaskBarJumpList *m_parent;
wxTaskBarJumpListItems m_items;
wxString m_title;
wxDECLARE_NO_COPY_CLASS(wxTaskBarJumpListCategory);
};
typedef wxVector<wxTaskBarJumpListCategory*> wxTaskBarJumpListCategories;
@@ -240,12 +250,13 @@ public:
wxTaskBarJumpListCategory* RemoveCustomCategory(const wxString& title);
void DeleteCustomCategory(const wxString& title);
private:
friend class wxTaskBarJumpListCategory;
void Update();
wxTaskBarJumpListImpl *m_jumpListImpl;
wxDECLARE_NO_COPY_CLASS(wxTaskBarJumpList);
};
#endif // wxUSE_TASKBARBUTTON