git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58351
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
static bool wx_spline_add_point(double x, double y);
static void wx_spline_draw_point_array(wxDC *dc);
static bool wx_spline_add_point(double x, double y);
static void wx_spline_draw_point_array(wxDC *dc);
-wxPointList wx_spline_point_list;
+static wxPointList wx_spline_point_list;
#define half(z1, z2) ((z1+z2)/2.0)
#define THRESHOLD 5
#define half(z1, z2) ((z1+z2)/2.0)
#define THRESHOLD 5
-void PNGLINKAGEMODE wx_PNG_stream_reader( png_structp png_ptr, png_bytep data,
- png_size_t length )
+static void PNGLINKAGEMODE wx_PNG_stream_reader( png_structp png_ptr, png_bytep data,
+ png_size_t length )
{
WX_PNG_INFO(png_ptr)->stream.in->Read(data, length);
}
{
WX_PNG_INFO(png_ptr)->stream.in->Read(data, length);
}
-void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data,
- png_size_t length )
+static void PNGLINKAGEMODE wx_PNG_stream_writer( png_structp png_ptr, png_bytep data,
+ png_size_t length )
{
WX_PNG_INFO(png_ptr)->stream.out->Write(data, length);
}
{
WX_PNG_INFO(png_ptr)->stream.out->Write(data, length);
}
PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message)
{
wxPNGInfoStruct *info = png_ptr ? WX_PNG_INFO(png_ptr) : NULL;
PNGLINKAGEMODE wx_png_warning(png_structp png_ptr, png_const_charp message)
{
wxPNGInfoStruct *info = png_ptr ? WX_PNG_INFO(png_ptr) : NULL;
// from pngerror.c
// so that the libpng doesn't send anything on stderr
// from pngerror.c
// so that the libpng doesn't send anything on stderr
PNGLINKAGEMODE wx_png_error(png_structp png_ptr, png_const_charp message)
{
wx_png_warning(NULL, message);
PNGLINKAGEMODE wx_png_error(png_structp png_ptr, png_const_charp message)
{
wx_png_warning(NULL, message);
+extern "C"
+{
+static int __cdecl
-extern "C" int LINKAGEMODE
+extern "C"
+{
+static int LINKAGEMODE
#endif
wx_comparestrings(const void *arg1, const void *arg2)
#endif
wx_comparestrings(const void *arg1, const void *arg2)
return wxStrcmp (*s1, *s2);
}
return wxStrcmp (*s1, *s2);
}
+} // end of extern "C" (required because of GCC Bug c++/33078
+
// Sort a list of strings - deallocates old nodes, allocates new
void wxStringList::Sort()
{
// Sort a list of strings - deallocates old nodes, allocates new
void wxStringList::Sort()
{
/////////////////////////////////////////////////////////////////////////////
// Class factory
/////////////////////////////////////////////////////////////////////////////
// Class factory
-wxZipClassFactory g_wxZipClassFactory;
+static wxZipClassFactory g_wxZipClassFactory;
wxZipClassFactory::wxZipClassFactory()
{
wxZipClassFactory::wxZipClassFactory()
{
m_lasterror = m_parent_o_stream->GetLastError();
m_endrecWritten = true;
m_lasterror = m_parent_o_stream->GetLastError();
m_endrecWritten = true;
if (!wxFilterOutputStream::Close() || !IsOk())
return false;
m_lasterror = wxSTREAM_EOF;
if (!wxFilterOutputStream::Close() || !IsOk())
return false;
m_lasterror = wxSTREAM_EOF;
bool m_sendSetColumnWidth;
int m_colToSend;
int m_widthToSend;
bool m_sendSetColumnWidth;
int m_colToSend;
int m_widthToSend;
virtual void OnInternalIdle();
private:
virtual void OnInternalIdle();
private:
void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxGenericListCtrl *parent = m_owner->GetListCtrl();
void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxGenericListCtrl *parent = m_owner->GetListCtrl();
wxPaintDC dc( this );
AdjustDC( dc );
wxPaintDC dc( this );
AdjustDC( dc );
void wxListHeaderWindow::OnInternalIdle()
{
wxWindow::OnInternalIdle();
void wxListHeaderWindow::OnInternalIdle()
{
wxWindow::OnInternalIdle();
if (m_sendSetColumnWidth)
{
m_owner->SetColumnWidth( m_colToSend, m_widthToSend );
if (m_sendSetColumnWidth)
{
m_owner->SetColumnWidth( m_colToSend, m_widthToSend );
void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
{
wxGenericListCtrl *parent = m_owner->GetListCtrl();
void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
{
wxGenericListCtrl *parent = m_owner->GetListCtrl();
// we want to work with logical coords
int x;
parent->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL);
// we want to work with logical coords
int x;
parent->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL);
wxCHECK_RET( InReportView(),
_T("SetColumnWidth() can only be called in report mode.") );
wxCHECK_RET( InReportView(),
_T("SetColumnWidth() can only be called in report mode.") );
m_dirty = true;
wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin;
m_dirty = true;
wxListHeaderWindow *headerWin = GetListCtrl()->m_headerWin;
// sorting
// ----------------------------------------------------------------------------
// sorting
// ----------------------------------------------------------------------------
-wxListCtrlCompare list_ctrl_compare_func_2;
-long list_ctrl_compare_data;
+static wxListCtrlCompare list_ctrl_compare_func_2;
+static long list_ctrl_compare_data;
int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 )
{
int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 )
{
void wxListMainWindow::OnScroll(wxScrollWinEvent& event)
{
wxPrintf( "wxListMainWindow::OnScroll\n" );
void wxListMainWindow::OnScroll(wxScrollWinEvent& event)
{
wxPrintf( "wxListMainWindow::OnScroll\n" );
// HandleOnScroll( event );
// update our idea of which lines are shown when we redraw the window the
// HandleOnScroll( event );
// update our idea of which lines are shown when we redraw the window the
{
bool needs_header = HasHeader();
bool has_header = (m_headerWin != NULL);
{
bool needs_header = HasHeader();
bool has_header = (m_headerWin != NULL);
if (needs_header == has_header)
return;
if (needs_header == has_header)
return;
wxSize(GetClientSize().x, m_headerHeight),
wxTAB_TRAVERSAL
);
wxSize(GetClientSize().x, m_headerHeight),
wxTAB_TRAVERSAL
);
#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON
wxFont font;
#if wxOSX_USE_ATSU_TEXT
#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON
wxFont font;
#if wxOSX_USE_ATSU_TEXT
#endif
m_headerWin->SetFont( font );
#endif
#endif
m_headerWin->SetFont( font );
#endif
GetSizer()->Prepend( m_headerWin, 0, wxGROW );
}
else
{
GetSizer()->Detach( m_headerWin );
GetSizer()->Prepend( m_headerWin, 0, wxGROW );
}
else
{
GetSizer()->Detach( m_headerWin );
#ifdef __WXGTK__
style &= ~wxBORDER_MASK;
style |= wxBORDER_THEME;
#ifdef __WXGTK__
style &= ~wxBORDER_MASK;
style |= wxBORDER_THEME;
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
SetTargetWindow( m_mainWin );
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
SetTargetWindow( m_mainWin );
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
sizer->Add( m_mainWin, 1, wxGROW );
SetSizer( sizer );
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
sizer->Add( m_mainWin, 1, wxGROW );
SetSizer( sizer );
CreateOrDestroyHeaderWindowAsNeeded();
SetInitialSize(size);
CreateOrDestroyHeaderWindowAsNeeded();
SetInitialSize(size);
// m_mainWin->DeleteEverything(); wxMSW doesn't do that
CreateOrDestroyHeaderWindowAsNeeded();
// m_mainWin->DeleteEverything(); wxMSW doesn't do that
CreateOrDestroyHeaderWindowAsNeeded();
// if we don't have the header any longer, we need to relayout the window
// if ( !GetColumnCount() )
// if we don't have the header any longer, we need to relayout the window
// if ( !GetColumnCount() )
Layout();
m_mainWin->RecalculatePositions();
Layout();
m_mainWin->RecalculatePositions();
};
// Comparison routine for bsearch into an int* array of pagebreaks.
};
// Comparison routine for bsearch into an int* array of pagebreaks.
-extern "C" int wxCMPFUNC_CONV wxInteger_compare(void const* i0, void const* i1)
- return *(int*)i0 - *(int*)i1;
+ static int wxCMPFUNC_CONV wxInteger_compare(void const* i0, void const* i1)
+ {
+ return *(int*)i0 - *(int*)i1;
+ }
}
bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, wxArrayInt& known_pagebreaks) const
}
bool wxHtmlPageBreakCell::AdjustPagebreak(int* pagebreak, wxArrayInt& known_pagebreaks) const