/* Copyright (C) 2020-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: WxdkdrawDlgOptionsScreen.wxc */ /** @file WxdkdrawDlgOptionsScreen.cpp The WxdkdrawDlgOptionsScreen module. */ #line 223 "WxdkdrawDlgOptionsScreen.wxc" #ifndef WXDKDRAWDLGDOTFILLED_H_INCLUDED #include "WxdkdrawDlgOptionsScreen.h" #endif #line 230 "WxdkdrawDlgOptionsScreen.wxc" /** Events to process in this dialog. */ #if wxCHECK_VERSION(3,0,0) wxBEGIN_EVENT_TABLE(WxdkdrawDlgOptionsScreen,wxDialog) #else BEGIN_EVENT_TABLE(WxdkdrawDlgOptionsScreen,wxDialog) #endif EVT_BUTTON(\ wxID_OK,\ WxdkdrawDlgOptionsScreen::OnOK\ ) EVT_BUTTON(\ wxID_CANCEL,\ WxdkdrawDlgOptionsScreen::OnCancel\ ) EVT_SPINCTRL(\ WxdkdrawDlgOptionsScreen::WXD_ID_SUBSEGS,\ WxdkdrawDlgOptionsScreen::OnSubsegs\ ) EVT_CHECKBOX(\ WxdkdrawDlgOptionsScreen::WXD_ID_EXACT,\ WxdkdrawDlgOptionsScreen::OnFontExact\ ) EVT_CHECKBOX(\ WxdkdrawDlgOptionsScreen::WXD_ID_POINT_OPS,\ WxdkdrawDlgOptionsScreen::OnMarkupReduce\ ) #if wxCHECK_VERSION(3,0,0) wxEND_EVENT_TABLE() #else END_EVENT_TABLE() #endif #line 267 "WxdkdrawDlgOptionsScreen.wxc" WxdkdrawDlgOptionsScreen::WxdkdrawDlgOptionsScreen( WxdkdrawFrame *pParent, wxControl *pControl, Wxd_drawing_t *pDrw, int *pSubsegs, int *pExact, int *pReduce, wxChar const * const *pTexts ) : wxDialog( pParent, wxID_ANY, pTexts[635], wxDefaultPosition, wxDefaultSize, ( (wxDEFAULT_DIALOG_STYLE) & (~(wxRESIZE_BORDER)) & (~(wxCLOSE_BOX)) & (~(wxSYSTEM_MENU)) ) ), #if defined(__WXMSW__) m_oColourRed(127, 0, 0) #else m_oColourRed(191, 0, 0) #endif { m_pParent = pParent; m_pControl = pControl; m_pDrw = pDrw; m_sTexts = pTexts; m_pSubsegs = pSubsegs; m_pExact = pExact; m_pReduceMarkup = pReduce; m_iSubsegments = *pSubsegs; m_iExact = *pExact; m_iReduceMarkup = *pReduce; dkctGUILayoutOK = false; sizerHorizontal = NULL; sizerVertical = NULL; sizerContents = NULL; sizerButtons = NULL; lTexts = NULL; cbTexts = NULL; lSplines = NULL; lSubsegs = NULL; spSubsegs = NULL; lPointMoveOps = NULL; cbPointMoveOps = NULL; buttonOK = NULL; buttonCancel = NULL; sizerHorizontal = new wxBoxSizer( wxHORIZONTAL ); if(!(sizerHorizontal)) { goto dkctGUILayoutFinished; } sizerHorizontal->Add(10, 10, 0); sizerVertical = new wxBoxSizer( wxVERTICAL ); if(!(sizerVertical)) { goto dkctGUILayoutFinished; } sizerVertical->Add(10, 10, 0); sizerContents = new wxGridBagSizer( 5, 5 ); if(!(sizerContents)) { goto dkctGUILayoutFinished; } lTexts = new wxStaticText( this, wxID_ANY, pTexts[636] ); if(!(lTexts)) { goto dkctGUILayoutFinished; } sizerContents->Add( lTexts, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); cbTexts = new wxCheckBox( this, WXD_ID_EXACT, pTexts[637] ); if(!(cbTexts)) { goto dkctGUILayoutFinished; } cbTexts->SetToolTip(pTexts[638]); sizerContents->Add( cbTexts, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); sizerContents->Add(10, 10, wxGBPosition(2, 0), wxGBSpan(1, 2)); lSplines = new wxStaticText( this, wxID_ANY, pTexts[632] ); if(!(lSplines)) { goto dkctGUILayoutFinished; } sizerContents->Add( lSplines, wxGBPosition(3, 0), wxGBSpan(1, 2), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); lSubsegs = new wxStaticText( this, wxID_ANY, pTexts[633] ); if(!(lSubsegs)) { goto dkctGUILayoutFinished; } sizerContents->Add( lSubsegs, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL ); spSubsegs = new wxSpinCtrl( this, WXD_ID_SUBSEGS, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, 2, 32, 4 ); if(!(spSubsegs)) { goto dkctGUILayoutFinished; } spSubsegs->SetToolTip(pTexts[634]); sizerContents->Add( spSubsegs, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); sizerContents->Add(10, 10, wxGBPosition(5, 0), wxGBSpan(1, 2)); lPointMoveOps = new wxStaticText( this, wxID_ANY, pTexts[639] ); if(!(lPointMoveOps)) { goto dkctGUILayoutFinished; } sizerContents->Add( lPointMoveOps, wxGBPosition(6, 0), wxGBSpan(1, 2), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); cbPointMoveOps = new wxCheckBox( this, WXD_ID_POINT_OPS, pTexts[640] ); if(!(cbPointMoveOps)) { goto dkctGUILayoutFinished; } cbPointMoveOps->SetToolTip(pTexts[641]); sizerContents->Add( cbPointMoveOps, wxGBPosition(7, 0), wxGBSpan(1, 2), wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL ); sizerVertical->Add( sizerContents, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW ); sizerVertical->Add(10, 10, 0); sizerButtons = new wxStdDialogButtonSizer( ); if(!(sizerButtons)) { goto dkctGUILayoutFinished; } buttonOK = new wxButton( this, wxID_OK, pTexts[476] ); if(!(buttonOK)) { goto dkctGUILayoutFinished; } buttonOK->SetToolTip(pTexts[478]); sizerButtons->AddButton( buttonOK ); buttonCancel = new wxButton( this, wxID_CANCEL, pTexts[477] ); if(!(buttonCancel)) { goto dkctGUILayoutFinished; } buttonCancel->SetToolTip(pTexts[479]); sizerButtons->AddButton( buttonCancel ); sizerButtons->Realize(); sizerVertical->Add( sizerButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW ); sizerVertical->Add(10, 10, 0); sizerHorizontal->Add( sizerVertical ); sizerHorizontal->Add(10, 10, 0); SetSizer(sizerHorizontal); dkctGUILayoutOK = true; dkctGUILayoutFinished: if(dkctGUILayoutOK) { sizerHorizontal->Fit(this); sizerHorizontal->SetSizeHints(this); } #line 304 "WxdkdrawDlgOptionsScreen.wxc" if (dkctGUILayoutOK) { /* Fix dialog size */ wxSize minsize = GetMinSize(); SetMaxSize(minsize); /* Retrieve object attributes */ lSplines->SetForegroundColour(m_oColourRed); lTexts->SetForegroundColour(m_oColourRed); lPointMoveOps->SetForegroundColour(m_oColourRed); cbTexts->SetValue((0 != *m_pExact)); spSubsegs->SetValue(*m_pSubsegs); cbPointMoveOps->SetValue((0 != *m_pReduceMarkup)); } } #line 324 "WxdkdrawDlgOptionsScreen.wxc" void WxdkdrawDlgOptionsScreen::OnOK(wxCommandEvent & WXUNUSED(event)) { *m_pSubsegs = m_iSubsegments = spSubsegs->GetValue(); *m_pExact = m_iExact = (((cbTexts->GetValue()) ? 1 : 0)); *m_pReduceMarkup = m_iReduceMarkup = (((cbPointMoveOps->GetValue()) ? 1 : 0)); if(IsModal()) { EndModal(wxID_OK); } else { SetReturnCode(wxID_OK); Show(false); } } void WxdkdrawDlgOptionsScreen::OnCancel(wxCommandEvent & WXUNUSED(event)) { *m_pSubsegs = m_iSubsegments; *m_pExact = m_iExact; *m_pReduceMarkup = m_iReduceMarkup; if(IsModal()) { EndModal(wxID_CANCEL); } else { SetReturnCode(wxID_CANCEL); Show(false); } } void WxdkdrawDlgOptionsScreen::OnSubsegs(wxSpinEvent & WXUNUSED(event)) { #line 365 "WxdkdrawDlgOptionsScreen.wxc" *m_pSubsegs = spSubsegs->GetValue(); wxdobj_drw_require_redraw(m_pDrw, WXD_REFRESH_DRAWING); m_pControl->Refresh(); m_pParent->Update(); #line 370 "WxdkdrawDlgOptionsScreen.wxc" } void WxdkdrawDlgOptionsScreen::OnFontExact(wxCommandEvent & WXUNUSED(event)) { #line 378 "WxdkdrawDlgOptionsScreen.wxc" *m_pExact = ((cbTexts->GetValue()) ? 1 : 0); m_pParent->UpdateFonts(); wxdobj_drw_require_redraw(m_pDrw, WXD_REFRESH_DRAWING); m_pControl->Refresh(); m_pParent->Refresh(); m_pParent->Update(); #line 385 "WxdkdrawDlgOptionsScreen.wxc" } void WxdkdrawDlgOptionsScreen::OnMarkupReduce(wxCommandEvent & WXUNUSED(event)) { #line 393 "WxdkdrawDlgOptionsScreen.wxc" *m_pReduceMarkup = (((cbPointMoveOps->GetValue()) ? 1 : 0)); wxdobj_drw_require_redraw(m_pDrw, WXD_REFRESH_MARKUP); m_pControl->Refresh(); m_pParent->Refresh(); m_pParent->Update(); #line 399 "WxdkdrawDlgOptionsScreen.wxc" #line 400 "WxdkdrawDlgOptionsScreen.wxc" } /* vim: set ai sw=4 ts=4 : */