more HP-UX compilation warnings fixed (187th try)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,7 +41,7 @@ public:
|
|||||||
// class: the owner will get timer notifications which can be handled with
|
// class: the owner will get timer notifications which can be handled with
|
||||||
// EVT_TIMER
|
// EVT_TIMER
|
||||||
wxTimerBase(wxEvtHandler *owner, int id = -1)
|
wxTimerBase(wxEvtHandler *owner, int id = -1)
|
||||||
{ Init(); SetOwner(owner, -1); }
|
{ Init(); SetOwner(owner, id); }
|
||||||
|
|
||||||
// same as ctor above
|
// same as ctor above
|
||||||
void SetOwner(wxEvtHandler *owner, int id = -1)
|
void SetOwner(wxEvtHandler *owner, int id = -1)
|
||||||
|
@@ -92,7 +92,7 @@ public:
|
|||||||
// compatibility only, don't use
|
// compatibility only, don't use
|
||||||
void SetString(const wxString& to_tokenize,
|
void SetString(const wxString& to_tokenize,
|
||||||
const wxString& delims,
|
const wxString& delims,
|
||||||
bool ret_delim)
|
bool WXUNUSED(ret_delim))
|
||||||
{
|
{
|
||||||
SetString(to_tokenize, delims, wxTOKEN_RET_DELIMS);
|
SetString(to_tokenize, delims, wxTOKEN_RET_DELIMS);
|
||||||
}
|
}
|
||||||
|
@@ -1298,7 +1298,8 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
|
|||||||
long by = y + (long)floor( double(size) * 2.0 / 3.0 ); // approximate baseline
|
long by = y + (long)floor( double(size) * 2.0 / 3.0 ); // approximate baseline
|
||||||
|
|
||||||
// FIXME only correct for 90 degrees
|
// FIXME only correct for 90 degrees
|
||||||
fprintf(m_pstream, "%d %d moveto\n", XLOG2DEV(x + size), YLOG2DEV(by) );
|
fprintf(m_pstream, "%d %d moveto\n",
|
||||||
|
XLOG2DEV((wxCoord)(x + size)), YLOG2DEV(by) );
|
||||||
fprintf(m_pstream, "%.8f rotate\n", angle);
|
fprintf(m_pstream, "%.8f rotate\n", angle);
|
||||||
|
|
||||||
/* I don't know how to write char to a stream, so I use a mini string */
|
/* I don't know how to write char to a stream, so I use a mini string */
|
||||||
@@ -1336,8 +1337,8 @@ void wxPostScriptDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord
|
|||||||
|
|
||||||
if (m_font.GetUnderlined())
|
if (m_font.GetUnderlined())
|
||||||
{
|
{
|
||||||
long uy = (long)(y + size - m_underlinePosition);
|
wxCoord uy = (wxCoord)(y + size - m_underlinePosition);
|
||||||
long w, h;
|
wxCoord w, h;
|
||||||
GetTextExtent(text, &w, &h);
|
GetTextExtent(text, &w, &h);
|
||||||
|
|
||||||
fprintf( m_pstream,
|
fprintf( m_pstream,
|
||||||
|
@@ -335,7 +335,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_aMessages.Add(szString);
|
m_aMessages.Add(szString);
|
||||||
m_aSeverity.Add(level);
|
m_aSeverity.Add((int)level);
|
||||||
m_aTimes.Add((long)t);
|
m_aTimes.Add((long)t);
|
||||||
m_bHasMessages = TRUE;
|
m_bHasMessages = TRUE;
|
||||||
break;
|
break;
|
||||||
@@ -660,7 +660,7 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
|
|||||||
m_btnDetails = new wxButton(this, wxID_MORE, _T("&Details >>"));
|
m_btnDetails = new wxButton(this, wxID_MORE, _T("&Details >>"));
|
||||||
sizerButtons->Add(m_btnDetails, 0, wxCENTRE|wxTOP, MARGIN/2 - 1);
|
sizerButtons->Add(m_btnDetails, 0, wxCENTRE|wxTOP, MARGIN/2 - 1);
|
||||||
|
|
||||||
wxIcon icon = wxTheApp->GetStdIcon(style & wxICON_MASK);
|
wxIcon icon = wxTheApp->GetStdIcon((int)(style & wxICON_MASK));
|
||||||
sizerAll->Add(new wxStaticBitmap(this, -1, icon), 0, wxCENTRE);
|
sizerAll->Add(new wxStaticBitmap(this, -1, icon), 0, wxCENTRE);
|
||||||
const wxString& message = messages.Last();
|
const wxString& message = messages.Last();
|
||||||
sizerAll->Add(CreateTextSizer(message), 0, wxCENTRE|wxLEFT|wxRIGHT, MARGIN);
|
sizerAll->Add(CreateTextSizer(message), 0, wxCENTRE|wxLEFT|wxRIGHT, MARGIN);
|
||||||
|
@@ -78,8 +78,9 @@ void wxPlotArea::OnMouse( wxMouseEvent &event )
|
|||||||
view_x *= 10;
|
view_x *= 10;
|
||||||
view_y *= 10;
|
view_y *= 10;
|
||||||
|
|
||||||
int x = event.GetX();
|
wxPoint pos = event.GetPosition();
|
||||||
int y = event.GetY();
|
int x = pos.x;
|
||||||
|
int y = pos.y;
|
||||||
x += view_x;
|
x += view_x;
|
||||||
y += view_y;
|
y += view_y;
|
||||||
|
|
||||||
|
@@ -182,6 +182,23 @@ private:
|
|||||||
// implementation
|
// implementation
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// private functions
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// translate the key or mouse event flags to the type of selection we're
|
||||||
|
// dealing with
|
||||||
|
static void EventFlagsToSelType(long style,
|
||||||
|
bool shiftDown,
|
||||||
|
bool ctrlDown,
|
||||||
|
bool *is_multiple,
|
||||||
|
bool *extended_select,
|
||||||
|
bool *unselect_others)
|
||||||
|
{
|
||||||
|
*is_multiple = (style & wxTR_MULTIPLE) != 0;
|
||||||
|
*extended_select = shiftDown && is_multiple;
|
||||||
|
*unselect_others = !(extended_select || (ctrlDown && is_multiple));
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// wxTreeRenameTimer (internal)
|
// wxTreeRenameTimer (internal)
|
||||||
@@ -781,7 +798,7 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) co
|
|||||||
wxArrayGenericTreeItems& children = item.m_pItem->GetChildren();
|
wxArrayGenericTreeItems& children = item.m_pItem->GetChildren();
|
||||||
if ( (size_t)cookie < children.Count() )
|
if ( (size_t)cookie < children.Count() )
|
||||||
{
|
{
|
||||||
return children.Item(cookie++);
|
return children.Item((size_t)cookie++);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1713,7 +1730,7 @@ void wxTreeCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
|||||||
void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||||
{
|
{
|
||||||
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||||
te.m_code = event.KeyCode();
|
te.m_code = (int)event.KeyCode();
|
||||||
te.SetEventObject( this );
|
te.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( te );
|
GetEventHandler()->ProcessEvent( te );
|
||||||
|
|
||||||
@@ -1723,9 +1740,12 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
// how should the selection work for this event?
|
||||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
bool is_multiple, extended_select, unselect_others;
|
||||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
EventFlagsToSelType(GetWindowStyleFlag(),
|
||||||
|
event.ShiftDown(),
|
||||||
|
event.ControlDown(),
|
||||||
|
&is_multiple, &extended_select, &unselect_others);
|
||||||
|
|
||||||
switch (event.KeyCode())
|
switch (event.KeyCode())
|
||||||
{
|
{
|
||||||
@@ -1905,8 +1925,8 @@ wxTreeItemId wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
|
|||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
long x = dc.DeviceToLogicalX( (long)point.x );
|
wxCoord x = dc.DeviceToLogicalX( point.x );
|
||||||
long y = dc.DeviceToLogicalY( (long)point.y );
|
wxCoord y = dc.DeviceToLogicalY( point.y );
|
||||||
int w, h;
|
int w, h;
|
||||||
GetSize(&w, &h);
|
GetSize(&w, &h);
|
||||||
|
|
||||||
@@ -1993,8 +2013,8 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
long x = dc.DeviceToLogicalX( (long)event.GetX() );
|
wxCoord x = dc.DeviceToLogicalX( event.GetX() );
|
||||||
long y = dc.DeviceToLogicalY( (long)event.GetY() );
|
wxCoord y = dc.DeviceToLogicalY( event.GetY() );
|
||||||
|
|
||||||
int flags=0;
|
int flags=0;
|
||||||
wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags);
|
wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags);
|
||||||
@@ -2042,9 +2062,12 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
// how should the selection work for this event?
|
||||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
bool is_multiple, extended_select, unselect_others;
|
||||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
EventFlagsToSelType(GetWindowStyleFlag(),
|
||||||
|
event.ShiftDown(),
|
||||||
|
event.ControlDown(),
|
||||||
|
&is_multiple, &extended_select, &unselect_others);
|
||||||
|
|
||||||
if (onButton)
|
if (onButton)
|
||||||
{
|
{
|
||||||
|
@@ -105,4 +105,9 @@ void _GSocket_Disable_Events(GSocket *socket)
|
|||||||
_GSocket_Uninstall_Callback(socket, GSOCK_OUTPUT);
|
_GSocket_Uninstall_Callback(socket, GSOCK_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* wxUSE_SOCKETS */
|
#else /* !wxUSE_SOCKETS */
|
||||||
|
|
||||||
|
/* some compilers don't like having empty source files */
|
||||||
|
static int wxDummyGsockVar = 0;
|
||||||
|
|
||||||
|
#endif /* wxUSE_SOCKETS/!wxUSE_SOCKETS */
|
||||||
|
@@ -105,4 +105,9 @@ void _GSocket_Disable_Events(GSocket *socket)
|
|||||||
_GSocket_Uninstall_Callback(socket, GSOCK_OUTPUT);
|
_GSocket_Uninstall_Callback(socket, GSOCK_OUTPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* wxUSE_SOCKETS */
|
#else /* !wxUSE_SOCKETS */
|
||||||
|
|
||||||
|
/* some compilers don't like having empty source files */
|
||||||
|
static int wxDummyGsockVar = 0;
|
||||||
|
|
||||||
|
#endif /* wxUSE_SOCKETS/!wxUSE_SOCKETS */
|
||||||
|
Reference in New Issue
Block a user