virtual void SetStatusText(const wxString& text, int number = 0);
// Set status line widths
- virtual void SetStatusWidths(int n, int *widths_field);
+ virtual void SetStatusWidths(int n, const int widths_field[]);
// Hint to tell framework which status bar to use
// TODO: should this go into a wxFrameworkSettings class perhaps?
bool Create(wxWindow *parent, wxWindowID id = -1, long style = wxST_SIZEGRIP);
// a status line can have several (<256) fields numbered from 0
- virtual void SetFieldsCount(int number = 1, int *widths = NULL);
+ virtual void SetFieldsCount(int number = 1, const int widths[] = NULL);
// each field of status line has it's own text
virtual void SetStatusText(const wxString& text, int number = 0);
virtual wxString GetStatusText(int number = 0) const;
// set status line fields' widths
- virtual void SetStatusWidths(int n, int *widths_field);
+ virtual void SetStatusWidths(int n, const int widths_field[]);
// we're going to process WM_SIZE (of the parent window)
void OnSize(wxSizeEvent& event);
DECLARE_EVENT_TABLE()
protected:
- void CopyFieldsWidth(int *widths);
+ void CopyFieldsWidth(const int widths[]);
void SetFieldsWidth();
};
pd->Flags = PD_RETURNDC ;
// pd->lStructSize = sizeof( PRINTDLG );
pd->lStructSize = 66 ;
- pd->hwndOwner=(HANDLE)NULL;
+ pd->hwndOwner=(HWND)NULL;
pd->hDevNames=(HANDLE)NULL;
pd->hInstance=(HINSTANCE)NULL;
pd->lCustData = (LPARAM) NULL;
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
-#pragma implementation "utils.h"
+#pragma implementation "utilscmn.h"
#endif
// For compilers that support precompilation, includes "wx.h".
// set focus to the next child which accepts it (or first/last if node == NULL)
bool wxPanel::SetFocusToNextChild(wxNode *node, bool bForward)
{
+ // Added by JACS since this seems to cause an infinite loop.
+ return FALSE;
+
// @@ using typed list would be better...
#define WIN(node) ((wxWindow *)(node->Data()))
return success;
}
-void wxStatusBar::SetFieldsCount(int number, const int *widths)
+void wxStatusBar::SetFieldsCount(int number, const int widths[])
{
m_nFields = number;
return m_statusStrings[n];
}
-void wxStatusBar::SetStatusWidths(int n, const int *widths_field)
+void wxStatusBar::SetStatusWidths(int n, const int widths_field[])
{
// only set status widths, when n == number of statuswindows
if (n == m_nFields)
HPEN orig_pen = NULL;
if (do_pen || !m_pen.Ok())
- orig_pen = ::SelectObject((HDC) m_hDC, ::GetStockObject(NULL_PEN));
+ orig_pen = (HPEN) ::SelectObject((HDC) m_hDC, (HPEN) ::GetStockObject(NULL_PEN));
(void)Rectangle((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y),
XLOG2DEV(x2) + 1, YLOG2DEV(y2) + 1);
HBRUSH orig_brush = NULL;
if (do_brush || !m_brush.Ok())
- orig_brush = ::SelectObject((HDC) m_hDC, ::GetStockObject(NULL_BRUSH));
+ orig_brush = (HBRUSH) ::SelectObject((HDC) m_hDC, (HBRUSH) ::GetStockObject(NULL_BRUSH));
(void)Rectangle((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y),
XLOG2DEV(x2), YLOG2DEV(y2));
// draw pie with NULL_PEN first and then outline otherwise a line is
// drawn from the start and end points to the centre
- HPEN orig_pen = ::SelectObject((HDC) m_hDC, ::GetStockObject(NULL_PEN));
+ HPEN orig_pen = (HPEN) ::SelectObject((HDC) m_hDC, (HPEN) ::GetStockObject(NULL_PEN));
if (m_signY > 0)
{
(void)Pie((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2)+1, YLOG2DEV(y2)+1,
if (m_brush.GetResourceHandle())
{
HBRUSH b = 0;
- b = ::SelectObject((HDC) m_hDC, (HBRUSH)m_brush.GetResourceHandle()) ;
+ b = (HBRUSH) ::SelectObject((HDC) m_hDC, (HBRUSH)m_brush.GetResourceHandle()) ;
if (!m_oldBrush)
m_oldBrush = (WXHBRUSH) b;
}
#if DEBUG > 1
wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle());
#endif
- HFONT f = ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
+ HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
if (!m_oldFont)
m_oldFont = (WXHFONT) f;
}
GetTextExtentPoint((HDC) m_hDC, (char *)(const char *) string, strlen((char *)(const char *) string), &sizeRect);
GetTextMetrics((HDC) m_hDC, &tm);
- if (x) *x = XDEV2LOGREL(sizeRect.cx);
- if (y) *y = YDEV2LOGREL(sizeRect.cy);
+ *x = XDEV2LOGREL(sizeRect.cx);
+ *y = YDEV2LOGREL(sizeRect.cy);
if (descent) *descent = tm.tmDescent;
if (externalLeading) *externalLeading = tm.tmExternalLeading;
}
*externalLeading = externalLeading1;
}
#endif
+
m_frameStatusBar->SetStatusText(text, number);
}
-void wxFrame::SetStatusWidths(int n, int *widths_field)
+void wxFrame::SetStatusWidths(int n, const int widths_field[])
{
wxCHECK_RET( m_frameStatusBar != NULL, "no statusbar to set widths for" );
$(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \
$(MSWDIR)\nativdlg.obj \
+ $(MSWDIR)\notebook.obj \
$(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \
$(MSWDIR)\pen.obj \
$(MSWDIR)\nativdlg.obj: $(MSWDIR)\nativdlg.$(SRCSUFF)
+$(MSWDIR)\notebook.obj: $(MSWDIR)\notebook.$(SRCSUFF)
+
$(MSWDIR)\ownerdrw.obj: $(MSWDIR)\ownerdrw.$(SRCSUFF)
$(MSWDIR)\palette.obj: $(MSWDIR)\palette.$(SRCSUFF)
minifram.$(OBJSUFF) \
msgdlg.$(OBJSUFF) \
nativdlg.$(OBJSUFF) \
+ notebook.$(OBJSUFF) \
ownerdrw.$(OBJSUFF) \
palette.$(OBJSUFF) \
pen.$(OBJSUFF) \
$(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \
$(MSWDIR)\nativdlg.obj \
+ $(MSWDIR)\notebook.obj \
$(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \
$(MSWDIR)\pen.obj \
// the same arguments as for wxControl
wxNotebook::wxNotebook(wxWindow *parent,
- const wxWindowID id,
+ wxWindowID id,
const wxPoint& pos,
const wxSize& size,
- const long style,
+ long style,
const wxString& name)
{
Init();
// Create() function
bool wxNotebook::Create(wxWindow *parent,
- const wxWindowID id,
+ wxWindowID id,
const wxPoint& pos,
const wxSize& size,
- const long style,
+ long style,
const wxString& name)
{
// base init
wxFAIL_MSG("wxNotebook::Command not implemented");
}
-bool wxNotebook::MSWNotify(const WXWPARAM wParam, const WXLPARAM lParam)
+bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
{
wxNotebookEvent event(wxEVT_NULL, m_windowId,
TabCtrl_GetCurSel(m_hwnd), m_nSelection);
{
SetParent(parent);
- m_windowId = id == -1 ? NewControlId() : id;
+ if (id == -1)
+ m_windowId = NewControlId();
+ else
+ m_windowId = id;
DWORD wstyle = WS_CHILD | WS_VISIBLE;
if ( style & wxST_SIZEGRIP )
return TRUE;
}
-void wxStatusBar95::CopyFieldsWidth(int *widths)
+void wxStatusBar95::CopyFieldsWidth(const int widths[])
{
if (widths && !m_statusWidths)
m_statusWidths = new int[m_nFields];
}
}
-void wxStatusBar95::SetFieldsCount(int nFields, int *widths)
+void wxStatusBar95::SetFieldsCount(int nFields, const int widths[])
{
wxASSERT( (nFields > 0) && (nFields < 255) );
SetFieldsWidth();
}
-void wxStatusBar95::SetStatusWidths(int n, int *widths)
+void wxStatusBar95::SetStatusWidths(int n, const int widths[])
{
// @@ I don't understand what this function is for...
wxASSERT( n == m_nFields );
if (len > 0)
{
StatusBar_GetText(hwnd, nField, str.GetWriteBuf(len));
+ str.UngetWriteBuf();
}
return str;
}
case wxPropertyValueInteger:
return new wxPropertyValue(value.integer);
case wxPropertyValuebool:
- return new wxPropertyValue((value.integer != 0));
+ return new wxPropertyValue((bool) (value.integer != 0));
case wxPropertyValueReal:
return new wxPropertyValue(value.real);
case wxPropertyValueString: