(void)new wxStaticText( panel, -1,
"Drag the slider!",
wxPoint(228,30),
- wxSize(230, -1)
+ wxSize(240, -1)
);
#else
(void)new wxStaticText( panel, -1,
"This is also supposed to demonstrate how\n"
"to use static controls.\n",
wxPoint(228,25),
- wxSize(230, 110)
+ wxSize(240, 110)
);
#endif
m_spintext = new wxTextCtrl( panel, -1, "0", wxPoint(20,160), wxSize(80,-1) );
void MyFrame::NumericEntry(wxCommandEvent& WXUNUSED(event) )
{
- long res = wxGetNumberFromUser("", "Enter a number:", "Numeric input test",
- 50, 0, 100, this);
+ long res = wxGetNumberFromUser( "This is some text, actually a lot of text.\n"
+ "Even two rows of text.",
+ "Enter a number:", "Numeric input test",
+ 50, 0, 100, this );
wxString msg;
int icon;
const wxString& defaultPath, long style,
const wxPoint& pos) :
wxDialog(parent, -1, message, pos, wxSize(300,300),
- wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL)
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
{
m_message = message;
m_dialogStyle = style;
}
#if wxUSE_STATLINE
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
wxSetCursor( gs_savedCursor );
gs_savedCursor = wxNullCursor;
+
+ wxYield();
}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
}
#ifdef __WXGTK__
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
wxEventType command = wxEVT_NULL;
float line_step = win->m_adjust->step_increment;
- float page_step = win->m_adjust->page_increment;
if (fabs(diff-line_step) < sensitivity) command = wxEVT_SCROLL_LINEDOWN;
else if (fabs(diff+line_step) < sensitivity) command = wxEVT_SCROLL_LINEUP;
- else if (fabs(diff-page_step) < sensitivity) command = wxEVT_SCROLL_PAGEDOWN;
- else if (fabs(diff+page_step) < sensitivity) command = wxEVT_SCROLL_PAGEUP;
else command = wxEVT_SCROLL_THUMBTRACK;
int value = (int)ceil(win->m_adjust->value);
wxSpinEvent event( command, win->GetId());
event.SetPosition( value );
event.SetEventObject( win );
-
win->GetEventHandler()->ProcessEvent( event );
+
+ /* always send a thumbtrack event */
+ if (command != wxEVT_SCROLL_THUMBTRACK)
+ {
+ command = wxEVT_SCROLL_THUMBTRACK;
+ wxSpinEvent event2( command, win->GetId());
+ event2.SetPosition( value );
+ event2.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( event2 );
+ }
}
//-----------------------------------------------------------------------------
}
#if wxUSE_STATLINE
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
}
#if wxUSE_STATLINE
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
wxSetCursor( gs_savedCursor );
gs_savedCursor = wxNullCursor;
+
+ wxYield();
}
void wxBeginBusyCursor( wxCursor *WXUNUSED(cursor) )
}
#ifdef __WXGTK__
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
wxEventType command = wxEVT_NULL;
float line_step = win->m_adjust->step_increment;
- float page_step = win->m_adjust->page_increment;
if (fabs(diff-line_step) < sensitivity) command = wxEVT_SCROLL_LINEDOWN;
else if (fabs(diff+line_step) < sensitivity) command = wxEVT_SCROLL_LINEUP;
- else if (fabs(diff-page_step) < sensitivity) command = wxEVT_SCROLL_PAGEDOWN;
- else if (fabs(diff+page_step) < sensitivity) command = wxEVT_SCROLL_PAGEUP;
else command = wxEVT_SCROLL_THUMBTRACK;
int value = (int)ceil(win->m_adjust->value);
wxSpinEvent event( command, win->GetId());
event.SetPosition( value );
event.SetEventObject( win );
-
win->GetEventHandler()->ProcessEvent( event );
+
+ /* always send a thumbtrack event */
+ if (command != wxEVT_SCROLL_THUMBTRACK)
+ {
+ command = wxEVT_SCROLL_THUMBTRACK;
+ wxSpinEvent event2( command, win->GetId());
+ event2.SetPosition( value );
+ event2.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( event2 );
+ }
}
//-----------------------------------------------------------------------------
}
#if wxUSE_STATLINE
- (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) );
+ int edge_margin = 7;
+ (void) new wxStaticLine( this, -1, wxPoint(edge_margin,y-20), wxSize(w+30-2*edge_margin, 5) );
#endif
SetSize( w+30, y+40 );
GSocket_SetNonBlocking() puts the socket in non-blocking mode. This is useful
if we don't want to wait.
*/
-void GSocket_SetNonBlocking(GSocket *socket, bool non_block)
+void GSocket_SetNonBlocking(GSocket *socket, bool block)
{
assert(socket != NULL);
* GSocket_SetTimeout()
*/
-#ifndef LINUX
+#if !defined(__LINUX__) && !defined(__FREEBSD__)
# define CAN_USE_TIMEOUT
#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
# if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 1)