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
|
||||
// EVT_TIMER
|
||||
wxTimerBase(wxEvtHandler *owner, int id = -1)
|
||||
{ Init(); SetOwner(owner, -1); }
|
||||
{ Init(); SetOwner(owner, id); }
|
||||
|
||||
// same as ctor above
|
||||
void SetOwner(wxEvtHandler *owner, int id = -1)
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
// compatibility only, don't use
|
||||
void SetString(const wxString& to_tokenize,
|
||||
const wxString& delims,
|
||||
bool ret_delim)
|
||||
bool WXUNUSED(ret_delim))
|
||||
{
|
||||
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
|
||||
|
||||
// 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);
|
||||
|
||||
/* 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())
|
||||
{
|
||||
long uy = (long)(y + size - m_underlinePosition);
|
||||
long w, h;
|
||||
wxCoord uy = (wxCoord)(y + size - m_underlinePosition);
|
||||
wxCoord w, h;
|
||||
GetTextExtent(text, &w, &h);
|
||||
|
||||
fprintf( m_pstream,
|
||||
|
@@ -335,7 +335,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
|
||||
}
|
||||
|
||||
m_aMessages.Add(szString);
|
||||
m_aSeverity.Add(level);
|
||||
m_aSeverity.Add((int)level);
|
||||
m_aTimes.Add((long)t);
|
||||
m_bHasMessages = TRUE;
|
||||
break;
|
||||
@@ -660,7 +660,7 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
|
||||
m_btnDetails = new wxButton(this, wxID_MORE, _T("&Details >>"));
|
||||
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);
|
||||
const wxString& message = messages.Last();
|
||||
sizerAll->Add(CreateTextSizer(message), 0, wxCENTRE|wxLEFT|wxRIGHT, MARGIN);
|
||||
|
@@ -78,8 +78,9 @@ void wxPlotArea::OnMouse( wxMouseEvent &event )
|
||||
view_x *= 10;
|
||||
view_y *= 10;
|
||||
|
||||
int x = event.GetX();
|
||||
int y = event.GetY();
|
||||
wxPoint pos = event.GetPosition();
|
||||
int x = pos.x;
|
||||
int y = pos.y;
|
||||
x += view_x;
|
||||
y += view_y;
|
||||
|
||||
|
@@ -182,6 +182,23 @@ private:
|
||||
// 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)
|
||||
@@ -781,7 +798,7 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& item, long& cookie) co
|
||||
wxArrayGenericTreeItems& children = item.m_pItem->GetChildren();
|
||||
if ( (size_t)cookie < children.Count() )
|
||||
{
|
||||
return children.Item(cookie++);
|
||||
return children.Item((size_t)cookie++);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1713,7 +1730,7 @@ void wxTreeCtrl::OnKillFocus( wxFocusEvent &WXUNUSED(event) )
|
||||
void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
{
|
||||
wxTreeEvent te( wxEVT_COMMAND_TREE_KEY_DOWN, GetId() );
|
||||
te.m_code = event.KeyCode();
|
||||
te.m_code = (int)event.KeyCode();
|
||||
te.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( te );
|
||||
|
||||
@@ -1723,9 +1740,12 @@ void wxTreeCtrl::OnChar( wxKeyEvent &event )
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
||||
// how should the selection work for this event?
|
||||
bool is_multiple, extended_select, unselect_others;
|
||||
EventFlagsToSelType(GetWindowStyleFlag(),
|
||||
event.ShiftDown(),
|
||||
event.ControlDown(),
|
||||
&is_multiple, &extended_select, &unselect_others);
|
||||
|
||||
switch (event.KeyCode())
|
||||
{
|
||||
@@ -1905,8 +1925,8 @@ wxTreeItemId wxTreeCtrl::HitTest(const wxPoint& point, int& flags)
|
||||
|
||||
wxClientDC dc(this);
|
||||
PrepareDC(dc);
|
||||
long x = dc.DeviceToLogicalX( (long)point.x );
|
||||
long y = dc.DeviceToLogicalY( (long)point.y );
|
||||
wxCoord x = dc.DeviceToLogicalX( point.x );
|
||||
wxCoord y = dc.DeviceToLogicalY( point.y );
|
||||
int w, h;
|
||||
GetSize(&w, &h);
|
||||
|
||||
@@ -1993,8 +2013,8 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
|
||||
wxClientDC dc(this);
|
||||
PrepareDC(dc);
|
||||
long x = dc.DeviceToLogicalX( (long)event.GetX() );
|
||||
long y = dc.DeviceToLogicalY( (long)event.GetY() );
|
||||
wxCoord x = dc.DeviceToLogicalX( event.GetX() );
|
||||
wxCoord y = dc.DeviceToLogicalY( event.GetY() );
|
||||
|
||||
int flags=0;
|
||||
wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags);
|
||||
@@ -2042,9 +2062,12 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||
return;
|
||||
}
|
||||
|
||||
bool is_multiple=(GetWindowStyleFlag() & wxTR_MULTIPLE);
|
||||
bool extended_select=(event.ShiftDown() && is_multiple);
|
||||
bool unselect_others=!(extended_select || (event.ControlDown() && is_multiple));
|
||||
// how should the selection work for this event?
|
||||
bool is_multiple, extended_select, unselect_others;
|
||||
EventFlagsToSelType(GetWindowStyleFlag(),
|
||||
event.ShiftDown(),
|
||||
event.ControlDown(),
|
||||
&is_multiple, &extended_select, &unselect_others);
|
||||
|
||||
if (onButton)
|
||||
{
|
||||
|
@@ -105,4 +105,9 @@ void _GSocket_Disable_Events(GSocket *socket)
|
||||
_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);
|
||||
}
|
||||
|
||||
#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