Added validation support
Fixed a few minor things in wxGrid Fixed bug in SetClippingregion Disabled SetDefault again Fixed bug in AddChild, SetSize et al. Add PROCESS_ENTER and wxEVT_TEXT_CHANGE Renamed OnOk -> OnOK Added a few compatibilty functions Added code to make iinterception of events possible and work git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,7 +43,7 @@ bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(wxDialog,wxWindow)
|
||||
EVT_BUTTON (wxID_OK, wxDialog::OnOk)
|
||||
EVT_BUTTON (wxID_OK, wxDialog::OnOK)
|
||||
EVT_BUTTON (wxID_CANCEL, wxDialog::OnCancel)
|
||||
EVT_BUTTON (wxID_APPLY, wxDialog::OnApply)
|
||||
EVT_CLOSE (wxDialog::OnCloseWindow)
|
||||
@@ -93,6 +93,11 @@ bool wxDialog::Create( wxWindow *parent,
|
||||
|
||||
SetTitle( title );
|
||||
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
|
||||
gtk_widget_set_usize( m_widget, m_width, m_height );
|
||||
|
||||
PostCreation();
|
||||
|
||||
return TRUE;
|
||||
@@ -134,7 +139,7 @@ void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
|
||||
};
|
||||
};
|
||||
|
||||
void wxDialog::OnOk( wxCommandEvent &WXUNUSED(event) )
|
||||
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
|
||||
{
|
||||
if ( Validate() && TransferDataFromWindow())
|
||||
{
|
||||
@@ -187,6 +192,19 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
};
|
||||
};
|
||||
|
||||
void wxDialog::ImplementSetPosition(void)
|
||||
{
|
||||
if ((m_x != -1) || (m_y != -1))
|
||||
gtk_widget_set_uposition( m_widget, m_x, m_y );
|
||||
}
|
||||
|
||||
void wxDialog::Centre( int direction )
|
||||
{
|
||||
if (direction & wxHORIZONTAL == wxHORIZONTAL) m_x = (gdk_screen_width () - m_width) / 2;
|
||||
if (direction & wxVERTICAL == wxVERTICAL) m_y = (gdk_screen_height () - m_height) / 2;
|
||||
ImplementSetPosition();
|
||||
}
|
||||
|
||||
bool wxDialog::Show( bool show )
|
||||
{
|
||||
if (!show && IsModal() && m_modalShowing)
|
||||
|
Reference in New Issue
Block a user