1. bug in wxSplitter corrected: mouse event coords may be negative when the
mouse is captured which made sash roll over the window 2. missing functions added to wxRadioBox 3. non existent functions removed from wxRadioBox and wxControl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -34,9 +34,6 @@ public:
|
|||||||
// Calls the callback and appropriate event handlers
|
// Calls the callback and appropriate event handlers
|
||||||
bool ProcessCommand(wxCommandEvent& event);
|
bool ProcessCommand(wxCommandEvent& event);
|
||||||
|
|
||||||
// Places item in centre of panel - so can't be used BEFORE panel->Fit()
|
|
||||||
void Centre(int direction = wxHORIZONTAL);
|
|
||||||
|
|
||||||
// MSW-specific
|
// MSW-specific
|
||||||
#ifdef __WIN95__
|
#ifdef __WIN95__
|
||||||
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
|
||||||
|
@@ -66,8 +66,6 @@ public:
|
|||||||
void GetSize(int *x, int *y) const;
|
void GetSize(int *x, int *y) const;
|
||||||
void GetPosition(int *x, int *y) const;
|
void GetPosition(int *x, int *y) const;
|
||||||
|
|
||||||
wxString GetLabel() const;
|
|
||||||
void SetLabel(const wxString& label);
|
|
||||||
void SetLabel(int item, const wxString& label);
|
void SetLabel(int item, const wxString& label);
|
||||||
void SetLabel(int item, wxBitmap *bitmap);
|
void SetLabel(int item, wxBitmap *bitmap);
|
||||||
wxString GetLabel(int item) const;
|
wxString GetLabel(int item) const;
|
||||||
|
@@ -263,11 +263,24 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
// Erase old tracker
|
// Erase old tracker
|
||||||
DrawSashTracker(m_oldX, m_oldY);
|
DrawSashTracker(m_oldX, m_oldY);
|
||||||
|
|
||||||
// Draw new one
|
#ifdef __WXMSW__
|
||||||
DrawSashTracker(x, y);
|
// As we captured the mouse, we may get the mouse events from outside
|
||||||
|
// our window - for example, negative values in x, y. This has a weird
|
||||||
|
// consequence under MSW where we use unsigned values sometimes and
|
||||||
|
// signed ones other times: the coordinates turn as big positive
|
||||||
|
// numbers and so the sash is drawn on the *right* side of the window
|
||||||
|
// instead of the left (or bottom instead of top). Correct this.
|
||||||
m_oldX = x;
|
m_oldX = x;
|
||||||
m_oldY = y;
|
m_oldY = y;
|
||||||
|
|
||||||
|
if ( (short)m_oldX < 0 )
|
||||||
|
m_oldX = 0;
|
||||||
|
if ( (short)m_oldY < 0 )
|
||||||
|
m_oldY = 0;
|
||||||
|
#endif // __WXMSW__
|
||||||
|
|
||||||
|
// Draw new one
|
||||||
|
DrawSashTracker(m_oldX, m_oldY);
|
||||||
}
|
}
|
||||||
else if ( event.LeftDClick() )
|
else if ( event.LeftDClick() )
|
||||||
{
|
{
|
||||||
|
@@ -123,10 +123,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
// base init
|
// base init
|
||||||
SetName(name);
|
CreateBase(parent, id, pos, size, style, name);
|
||||||
SetParent(parent);
|
|
||||||
|
|
||||||
m_windowId = id == -1 ? NewControlId() : id;
|
|
||||||
|
|
||||||
// colors and font
|
// colors and font
|
||||||
m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE));
|
m_backgroundColour = wxColour(GetSysColor(COLOR_BTNFACE));
|
||||||
|
@@ -287,8 +287,17 @@ wxRadioBox::~wxRadioBox()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString wxRadioBox::GetLabel(int item) const
|
||||||
|
{
|
||||||
|
wxCHECK_MSG( item >= 0 && item < m_noItems, "", "invalid radiobox index" );
|
||||||
|
|
||||||
|
return wxGetWindowText(m_radioButtons[item]);
|
||||||
|
}
|
||||||
|
|
||||||
void wxRadioBox::SetLabel(int item, const wxString& label)
|
void wxRadioBox::SetLabel(int item, const wxString& label)
|
||||||
{
|
{
|
||||||
|
wxCHECK_RET( item >= 0 && item < m_noItems, "invalid radiobox index" );
|
||||||
|
|
||||||
m_radioWidth[item] = m_radioHeight[item] = -1;
|
m_radioWidth[item] = m_radioHeight[item] = -1;
|
||||||
SetWindowText((HWND)m_radioButtons[item], label.c_str());
|
SetWindowText((HWND)m_radioButtons[item], label.c_str());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user