Code::Blocks
SVN r11506
include
cbstatusbar.h
Go to the documentation of this file.
1
/*
2
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3
* http://www.gnu.org/licenses/lgpl-3.0.html
4
*/
5
6
#ifndef CBSTATUSBAR_H
7
#define CBSTATUSBAR_H
8
9
#include <vector>
10
#include <
wx/statusbr.h
>
11
12
#include "
settings.h
"
13
14
class
cbPlugin
;
15
18
class
DLLIMPORT
cbStatusBar
:
public
wxStatusBar
19
{
20
private
:
21
friend
class
MainFrame
;
// gets initialized from mainframe
22
23
// this will be used from friend mainframe
24
cbStatusBar
(
wxWindow
* parent,
wxWindowID
id
,
long
style,
const
wxString
& name);
25
cbStatusBar
() { ; };
26
cbStatusBar
(
const
cbStatusBar
& );
27
~
cbStatusBar
()
override
;
28
29
public
:
34
virtual
void
SetStatusTextByPlugin(
const
wxString
& text,
cbPlugin
* plugin);
35
40
virtual
wxString
GetStatusTextByPlugin(
cbPlugin
* plugin)
const
;
41
47
virtual
bool
GetFieldRectByPlugin(
cbPlugin
*plugin,
wxRect
& rect)
const
;
48
49
// functions used for the mainframe:
50
void
SetStatusWidths
(
int
n,
const
int
* widths)
override
;
51
57
void
AddField(
cbPlugin
* plugin,
wxWindow
* ctrl,
int
width);
58
62
void
AddField(
cbPlugin
* plugin,
int
width);
63
68
void
RemoveField(
cbPlugin
* plugin);
69
70
private
:
71
// event handlers
72
void
OnSize
(
wxSizeEvent
& event);
73
void
UpdateWidths();
74
75
void
AdjustFieldsSize();
76
int
GetFieldNumberOfPlugin(
cbPlugin
* plugin)
const
;
77
78
void
PushStatusText
(cb_unused
const
wxString
& text, cb_unused
cbPlugin
*plugin) { ; };
79
void
PopStatusText
(cb_unused
cbPlugin
* plugin) { ; };
80
81
struct
cbStatusBarElement
82
{
83
int
width
;
84
wxWindow
*
control
;
85
cbPlugin
*
plugin
;
86
};
87
typedef
std::vector<cbStatusBarElement>
ElementVector
;
88
ElementVector
m_Elements
;
89
std::vector<int>
m_MainWidths
;
90
91
DECLARE_EVENT_TABLE()
92
};
93
94
#endif //CBSTATUSBAR_H
MainFrame
Definition:
main.h:60
cbPlugin
Base class for plugins.
Definition:
cbplugin.h:84
wxRect
cbStatusBar::m_MainWidths
std::vector< int > m_MainWidths
Definition:
cbstatusbar.h:89
cbStatusBar::cbStatusBarElement::control
wxWindow * control
Definition:
cbstatusbar.h:84
wxStatusBar::SetStatusWidths
virtual void SetStatusWidths(int n, const int *widths_field)
cbStatusBar::cbStatusBarElement
Definition:
cbstatusbar.h:81
statusbr.h
DLLIMPORT
#define DLLIMPORT
Definition:
settings.h:16
cbStatusBar::ElementVector
std::vector< cbStatusBarElement > ElementVector
Definition:
cbstatusbar.h:87
cbStatusBar::m_Elements
ElementVector m_Elements
Definition:
cbstatusbar.h:88
settings.h
wxString
cbStatusBar
A custom status bar which can contain controls, icons...
Definition:
cbstatusbar.h:18
cbStatusBar::cbStatusBarElement::width
int width
Definition:
cbstatusbar.h:83
cbStatusBar::cbStatusBarElement::plugin
cbPlugin * plugin
Definition:
cbstatusbar.h:85
wxSizeEvent
MainFrame::OnSize
void OnSize(wxSizeEvent &event)
Definition:
main.cpp:2699
cbStatusBar::PopStatusText
void PopStatusText(cb_unused cbPlugin *plugin)
Definition:
cbstatusbar.h:79
wxStatusBar
cbStatusBar::PushStatusText
void PushStatusText(cb_unused const wxString &text, cb_unused cbPlugin *plugin)
Definition:
cbstatusbar.h:78
wxWindowID
int wxWindowID
wxWindow
cbStatusBar::cbStatusBar
cbStatusBar()
Definition:
cbstatusbar.h:25
Generated by
1.8.13