コード例 #1
0
	int CTemporalRefCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
	{
		if (CWnd::OnCreate(lpCreateStruct) == -1)
			return -1;

		if (m_ref.m_type != CTRef::UNKNOWN)
		{
			m_type = m_ref.m_type;
		}

		ASSERT(m_period.IsInside(m_ref));

		CreateControls();

		return 0;
	}
コード例 #2
0
bool mmAppStartDialog::Create(wxWindow* parent, wxWindowID id, const wxString& caption
    , const wxPoint& pos, const wxSize& size, long style)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    bool ok = wxDialog::Create(parent, id, caption, pos, size, style);

    if (ok) {
        SetIcon(mmex::getProgramIcon());
        CreateControls();
        GetSizer()->Fit(this);
        GetSizer()->SetSizeHints(this);
        CentreOnScreen();
    }

    return ok;
}
コード例 #3
0
ファイル: AboutDlg.cpp プロジェクト: Xangis/QuickTileViewer
/*!
 * AboutDlg creator
 */
bool AboutDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin AboutDlg member initialisation
////@end AboutDlg member initialisation

////@begin AboutDlg creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    Centre();
////@end AboutDlg creation
    return true;
}
コード例 #4
0
bool AISTargetQueryDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption,
                                   const wxPoint& pos, const wxSize& size, long style )
{
    //    As a display optimization....
    //    if current color scheme is other than DAY,
    //    Then create the dialog ..WITHOUT.. borders and title bar.
    //    This way, any window decorations set by external themes, etc
    //    will not detract from night-vision

    long wstyle = AIS_TARGET_QUERY_STYLE;
    if( ( global_color_scheme != GLOBAL_COLOR_SCHEME_DAY )
            && ( global_color_scheme != GLOBAL_COLOR_SCHEME_RGB ) ) wstyle |= ( wxNO_BORDER );

    if( !wxDialog::Create( parent, id, caption, pos, size, wstyle ) ) return false;

    m_parent = parent;
    
    wxFont *dFont = FontMgr::Get().GetFont( _("AISTargetQuery") );
    int font_size = wxMax(8, dFont->GetPointSize());
    wxString face = dFont->GetFaceName();
#ifdef __WXGTK__
    face = _T("Monospace");
#endif
    m_basefont = FontMgr::Get().FindOrCreateFont( font_size, wxFONTFAMILY_MODERN,
                      wxFONTSTYLE_NORMAL, dFont->GetWeight(), false, face );

    SetFont( *m_basefont );
    m_adjustedFontSize = dFont->GetPointSize();
    m_control_font_size = dFont->GetPointSize();
    
    CreateControls();

    SetColorScheme( global_color_scheme );


    //Set the maximum size of the entire settings dialog
    wxSize sz = g_Platform->getDisplaySize();
    SetSizeHints( 50, 50, sz.x-20, sz.y-40 );
    
    if(!m_bautosize){
        Fit();          // Sets the horizontal size OK
        Layout(); 
        SetSize( -1, m_adjustedFontSize * 30);          // Estimated vertical size
    }

    return true;
}
コード例 #5
0
ファイル: mainframe.cpp プロジェクト: NWNX/nwnx4
bool MainFrame::Create(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
{
////@begin MainFrame creation
    wxFrame::Create( parent, id, caption, pos, size, style );

    CreateControls();
    SetIcon(GetIconResource(wxT("res/nwnx4_icon.xpm")));
////@end MainFrame creation

	m_logger = new wxLogTextCtrl(m_log);
	wxLog::SetActiveTarget(m_logger);
	wxLog::AddTraceMask(TRACE_NORMAL);
	wxLog::AddTraceMask(TRACE_VERBOSE);

	wxLogMessage(wxT("Running in GUI mode."));

	wxDateTime now = wxDateTime::Now();
	m_startedAt->AppendText(now.Format());

	controller = new NWNXController(m_config);

	m_CmdLine->AppendText(controller->parameters);
	m_PWEnabled->SetValue(controller->processWatchdog);
	m_GWEnabled->SetValue(controller->gamespyWatchdog);
    m_PWInterval->AppendText(wxT("1"));
	m_GWInterval->AppendText(wxString::Format(wxT("%d"), controller->gamespyInterval));
    m_GWRetries->AppendText(wxString::Format(wxT("%d"), controller->gamespyTolerance));

	m_BtnStop->Enable(false);

	// Create worker thread
	worker = new NWNXWorker(controller, this);
	if (worker->Create() != wxTHREAD_NO_ERROR)
	{
		wxLogError(wxT("Can't create worker thread!"));
		worker->Delete();
		worker = NULL;
	}
	else
	{
		worker->Run();
		m_BtnStart->Enable(false);
		worker->startServer();
	}

    return true;
}
コード例 #6
0
SaveSelectionDlg::SaveSelectionDlg(Project* project_s,
								   wxWindow* parent,
								   wxWindowID id,
								   const wxString& caption,
								   const wxPoint& pos,
								   const wxSize& size, long style )
: project(project_s), grid_base(project_s->GetGridBase()),
m_all_init(false), is_space_time(project_s->GetGridBase()->IsTimeVariant())
{
	SetParent(parent);
    CreateControls();
    Centre();
	InitTime();
	FillColIdMap();
	InitField();
	m_all_init = true;
}
コード例 #7
0
void mmCustomFieldListDialog::Create(wxWindow* parent)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    long style = wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER;

    wxString WindowTitle = wxString::Format(_("Personalize custom fields | %s"), m_RefType);
    if (!wxDialog::Create(parent, wxID_ANY, WindowTitle, wxDefaultPosition, wxDefaultSize, style))
        return;

    CreateControls();
    fillControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    fillControls();
    SetIcon(mmex::getProgramIcon());
    Centre();
}
コード例 #8
0
bool mmMainCurrencyDialog::Create(wxWindow* parent
    , wxWindowID id
    , const wxString& caption
    , const wxPoint& pos
    , const wxSize& size
    , long style)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create(parent, id, caption, pos, size, style);

    CreateControls();
    SetIcon(mmex::getProgramIcon());
    fillControls();
    Centre();

    return TRUE;
}
コード例 #9
0
bool mmCategDialog::Create(wxWindow* parent, wxWindowID id
    , const wxString& caption, const wxPoint& pos
    , const wxSize& size, long style)
{
    SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create(parent, id, caption, pos, size, style);

    CreateControls();
    fillControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    this->SetInitialSize();
    SetIcon(mmex::getProgramIcon());
    SetMinSize(wxSize(316, 316));
    Centre();
    return TRUE;
}
コード例 #10
0
bool ShareTransactionDialog::Create(wxWindow* parent, wxWindowID id, const wxString& caption
    , const wxPoint& pos, const wxSize& size, long style)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create(parent, id, caption, pos, size, style);

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);

    SetIcon(mmex::getProgramIcon());

    DataToControls();

    Centre();
    return TRUE;
}
コード例 #11
0
ファイル: sqlhistory.cpp プロジェクト: pr1n4ple/wxSqlitePlus
/*---------------------------------------------------------------------------*/
bool wxSQLHistory::Create(wxWindow* parent, wxWindowID id,
                          const wxString& caption, const wxPoint& pos,
                          const wxSize& size, long style)
{
   SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
   wxDialog::Create(parent, id, caption, pos, size, style);

   CreateControls();
   SetIcon(wxGetApp().GetIcon(ID_ICO_SQLHISTO));

   if (GetSizer())
   {
      GetSizer()->SetSizeHints(this);
   }
   Centre();
   return true;
}
コード例 #12
0
ShipDesigner::ShipDesigner( wxWindow* parent)
		:m_ToDesign(TD_SHIPS)
		,m_ToView(TV_EXISTING)
		,m_ChoosenView(-1)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, ID_SHIPDESIGNER, _("Ship & Starbase Designer")
				,wxDefaultPosition, wxSize(-1, -1)
				,wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX );

	CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
}
コード例 #13
0
ファイル: pantasklogo.cpp プロジェクト: dmccskylove/src
bool panTaskLogo::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
{
////@begin panTaskLogo creation
    wxPanel::Create( parent, id, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end panTaskLogo creation

	ReadParam();
	m_isloadImage =false;
    return true;
}
コード例 #14
0
ファイル: SetOtherDialog.cpp プロジェクト: GCY/wxRovio
bool SetOtherDialog::Create(wxWindow *parent,wxWindowID id,const wxString &caption,const wxPoint &pos,const wxSize &size,long style)
{
	SetExtraStyle(wxWS_EX_BLOCK_EVENTS | wxDIALOG_EX_CONTEXTHELP);

	if(!wxDialog::Create(parent,id,caption,pos,size,style)){
	  return false;
	}

	CreateControls();

	GetSizer()->Fit(this);
	GetSizer()->SetSizeHints(this);

	Center();

	return true;
}
コード例 #15
0
/*
 * ColdfireUnlockerDialogue creator
 */
bool ColdfireUnlockerPanel::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
{
//    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxPanel::Create(parent, id, pos, size, style);
    CreateControls();
    if (GetSizer()) {
        GetSizer()->SetSizeHints(this);
    }
    knownDevices.loadConfigFile();
    loadDeviceList();
//    flashEraseMethods.loadMethods();
    loadEraseMethodsList();

    versionStaticControl->SetLabel(_(PROGRAM_VERSION_STRING));
    targetSpeedTextControl->SetDecimalValue(8000);
    return true;
}
コード例 #16
0
ファイル: ProjectWelcomePage.cpp プロジェクト: Ocode/boinc
bool CProjectWelcomePage::Create( CBOINCBaseWizard* parent )
{
////@begin CProjectWelcomePage member initialisation

////@end CProjectWelcomePage member initialisation

	((CWizardAttach*)parent)->IsFirstPass = false;
 
////@begin CProjectWelcomePage creation
    wxWizardPageEx::Create( parent, ID_PROJECTWELCOMEPAGE );

    CreateControls();
    GetSizer()->Fit(this);
////@end CProjectWelcomePage creation

	return TRUE;
}
コード例 #17
0
ファイル: find.cpp プロジェクト: BackupTheBerlios/kicad-svn
bool WinEDA_PcbFindFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin WinEDA_PcbFindFrame member initialisation
    m_NewText = NULL;
////@end WinEDA_PcbFindFrame member initialisation

////@begin WinEDA_PcbFindFrame creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    Centre();
////@end WinEDA_PcbFindFrame creation
    return true;
}
コード例 #18
0
ファイル: foldtestpanel.cpp プロジェクト: Bluehorn/wxPython
bool FoldTestPanel::Create( wxWindow* parent, wxWindowID id, const wxString& WXUNUSED(caption), const wxPoint& pos, const wxSize& size, long style )
{
////@begin FoldTestPanel member initialisation
    blaat = NULL;
////@end FoldTestPanel member initialisation

////@begin FoldTestPanel creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxPanel::Create( parent, id, pos, size, style );

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    Centre();
////@end FoldTestPanel creation
    return true;
}
コード例 #19
0
ファイル: treeviewsample.cpp プロジェクト: eriser/wxsqlite3
bool
TreeviewSample::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
  wxFrame::Create( parent, id, caption, pos, size, style );

  CreateControls();
  SetIcon(wxICON(mondrian));
  SetMinSize(wxSize(500,200));
  if (GetSizer())
  {
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
  }
  Centre();

  return true;
}
コード例 #20
0
ファイル: DlgOptions.cpp プロジェクト: phenix3443/synecdoche
bool CDlgOptions::Create(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
{
////@begin CDlgOptions member initialisation
    m_LanguageSelectionCtrl = NULL;
    m_ReminderFrequencyCtrl = NULL;
    m_DialupStaticBoxCtrl = NULL;
#if defined(__WXMSW__)
    m_DialupConnectionsCtrl = NULL;
    m_DialupSetDefaultCtrl = NULL;
    m_DialupClearDefaultCtrl = NULL;
    m_DialupDefaultConnectionTextCtrl = NULL;
    m_DialupDefaultConnectionCtrl = NULL;
#endif      // __WXMSW__
    m_EnableHTTPProxyCtrl = NULL;
    m_HTTPAddressCtrl = NULL;
    m_HTTPPortCtrl = NULL;
    m_HTTPUsernameCtrl = NULL;
    m_HTTPPasswordCtrl = NULL;
    m_EnableSOCKSProxyCtrl = NULL;
    m_SOCKSAddressCtrl = NULL;
    m_SOCKSPortCtrl = NULL;
    m_SOCKSUsernameCtrl = NULL;
    m_SOCKSPasswordCtrl = NULL;
////@end CDlgOptions member initialisation

    wxString strCaption = caption;
    if (strCaption.IsEmpty()) {
        CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
        wxASSERT(pSkinAdvanced);
        wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));

        strCaption.Printf(_("%s - Options"), pSkinAdvanced->GetApplicationName().c_str());
    }

////@begin CDlgOptions creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, strCaption, pos, size, style );

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    Centre();
////@end CDlgOptions creation
    return TRUE;
}
コード例 #21
0
ファイル: connectmanagerdlg.cpp プロジェクト: luzhlon/cpp
bool ConnectManagerDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin ConnectManagerDlg creation
    SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end ConnectManagerDlg creation

	UpdateList();

    return true;
}
コード例 #22
0
ファイル: ClientStatisView.cpp プロジェクト: samkrew/nxp-lpc
int CGridChartWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;

	CWnd* pParent = NULL;
	if(lpCreateStruct)
	{
		pParent = CWnd::FromHandle (lpCreateStruct->hwndParent);
	}

	if (pParent != NULL && pParent->IsKindOf (RUNTIME_CLASS (CView)) == NULL)
	{
		return CreateControls ();
	}

	return 0;
}
コード例 #23
0
bool mmHomePagePanel::Create(wxWindow *parent
    , wxWindowID winid
    , const wxPoint& pos
    , const wxSize& size
    , long style
    , const wxString& name)
{
    SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);
    wxPanel::Create(parent, winid, pos, size, style, name);

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);

    createHTML();

    return TRUE;
}
コード例 #24
0
ファイル: pantaskcolor.cpp プロジェクト: dmccskylove/src
bool panTaskColor::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style )
{
////@begin panTaskColor creation
    wxPanel::Create( parent, id, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end panTaskColor creation

	m_meanblue->SetValue(c_pgvTask->gvTask_GetmeanBlue()) ;
	m_meanred->SetValue(c_pgvTask->gvTask_GetmeanRed());
	m_meangreen	->SetValue(c_pgvTask->gvTask_GetmeanGreen());
    return true;
}
コード例 #25
0
bool DlgSaveLayout::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin DlgSaveLayout member initialisation
    m_ComboLayout = NULL;
////@end DlgSaveLayout member initialisation

////@begin DlgSaveLayout creation
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    SetParent(parent);
    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);
    Centre();
////@end DlgSaveLayout creation

	SetTitle(caption);
    return true;
}
コード例 #26
0
/*---------------------------------------------------------------------------*/
bool wxBackupRestoreDbDlg::Create(wxWindow* parent, bool backup, wxWindowID id,
                                  const wxPoint& pos, const wxSize& size,
                                  long style)
{
   m_BackUp  = backup;
   SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
   wxDialog::Create(parent, id, (m_BackUp ? _("Backup Database") :
                                           _("Restore Database")),
                    pos, size, style);
   CreateControls();
   SetIcon(wxGetApp().GetIcon(ID_ICO_DATABASE));
   if (GetSizer())
   {
      GetSizer()->SetSizeHints(this);
   }
   Centre();
   return true;
}
コード例 #27
0
xOptionsDialog::xOptionsDialog(wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style)
    : wxDialog(parent, id, caption, pos, size, style)
{
    CurrentPage=NULL;
    MainSizer=NULL;
    MainListView=NULL;

    SetExtraStyle(GetExtraStyle() | wxWS_EX_BLOCK_EVENTS);

    CreateControls();
    Centre();

    wxSize MinSize = FindMinSize();
    SetSize(MinSize);
    SetSizeHints(MinSize);
    MainListView->Select(0); //Initially Select The First Item
    ShowSelectedPanel();
}
コード例 #28
0
ファイル: transdialog.cpp プロジェクト: twoubt/moneymanagerex
bool mmTransDialog::Create(wxWindow* parent, wxWindowID id, const wxString& caption
    , const wxPoint& pos, const wxSize& size, long style)
{
    SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create(parent, id, caption, pos, size, style);

    CreateControls();
    GetSizer()->Fit(this);
    GetSizer()->SetSizeHints(this);

    SetIcon(mmex::getProgramIcon());
    m_duplicate ? SetDialogTitle(_("Duplicate Transaction"))
                : SetDialogTitle(m_new_trx ? _("New Transaction") : _("Edit Transaction"));

    Centre();
    Fit();
    return TRUE;
}
コード例 #29
0
ファイル: papi_proxy.c プロジェクト: sh123/papi_proxy
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    LRESULT result;

    if (msg == _msgAttach)
        return HandleAPIAttach((HWND)wParam, lParam);

    if (msg == _msgDiscoverTest)
        return HandleAPIDiscoverTest((HWND)wParam);

    switch(msg)
    {
    case WM_CREATE:
        CreateControls(hwnd);
        break;

    case WM_DESTROY:
        PostQuitMessage(0);
        return FALSE;

    case WM_TIMER:
        break;

    case WM_COPYDATA:
        // reattach if fails
        result = HandleCopyData((HWND)wParam, (PCOPYDATASTRUCT)lParam);
        if (!result)
        {
            SkypeAttach(_hwnd);
            result = HandleCopyData((HWND)wParam, (PCOPYDATASTRUCT)lParam);
        }
        UpdateMessageCntText();
        return result;

    case API_ATTACH_AVAILABLE:
        SetConnStatusText("API_ATTACH_AVAILABLE");
        _hwndSkype = NULL;
        SkypeAttach(_hwnd);
        return TRUE;

    } // msg

    return DefWindowProcW(hwnd, msg, wParam, lParam);
}
コード例 #30
0
ファイル: lenmus_dlg_counters.cpp プロジェクト: gouchi/lenmus
//---------------------------------------------------------------------------------------
PractiseCounters::PractiseCounters(wxWindow* parent, wxWindowID id,
                                   ExerciseCtrol* pOwner, ExerciseOptions* pConstrains,
                                   LeitnerManager* pProblemMngr, const wxPoint& pos)
    : DlgCounters(parent, id, pOwner, pConstrains, pos)
{
    //initializations
    m_pProblemMngr = pProblemMngr;

    // Create the controls
    CreateControls();

    //load icons
    wxBitmap bmp = wxArtProvider::GetBitmap("button_accept", wxART_TOOLBAR, wxSize(24,24));
    m_pBmpRight->SetBitmap(bmp);
    bmp = wxArtProvider::GetBitmap("button_cancel", wxART_TOOLBAR, wxSize(24,24));
    m_pBmpWrong->SetBitmap(bmp);
    bmp = wxArtProvider::GetBitmap("diploma_cap", wxART_TOOLBAR, wxSize(35,24));
    m_pBmpTotal->SetBitmap(bmp);
}