Beispiel #1
0
OmniFEMMainFrame::OmniFEMMainFrame(const wxString &title, const wxPoint &pos, const wxSize &size) : wxFrame(NULL, wxID_ANY, title, pos, size)
{
	minSize = size;
	
    /* This creates the main menu Bar at the top */
    menuBar->Append(menuFile, "&File");
    menuBar->Append(menuEdit, "&Edit");
    menuBar->Append(menuView, "&View");
    menuBar->Append(menuMesh, "&Mesh");
    menuBar->Append(menuProblem, "&Problem");
    menuBar->Append(menuHelp, "&Help");
    
    
    /* Creating the menu listing of File menu */
    menuFile->Append(menubarID::ID_menubarNew, "&New\tCtrl-N");
    menuFile->Append(menubarID::ID_menubarSave, "&Save\tCtrl-S");
    menuFile->Append(menubarID::ID_menubarSaveAs, "&Save As");
	menuFile->Append(menubarID::ID_menubarOpen, "&Open");
    menuFile->AppendSeparator();
    menuFile->Append(wxID_EXIT);
    
    /* Creating the menu listinging of the Edit Menu */
	menuEdit->Append(menubarID::ID_menubarLUASCRIPT, "&Lua Script\tCtrl-L");
    menuEdit->Append(menubarID::ID_menubarPreferences, "&Preferences\tCtrl-P");
	
	/* Creting the menu listing of the View Menu */
	menuView->Append(menubarID::ID_menubarViewResults, "&View Results");
	
	/* Create the menu listing for the mesh menu */
	menuMesh->Append(menubarID::ID_menubarCreateMesh, "&Create Mesh");
	menuMesh->Append(menubarID::ID_menubarShowMesh, "&Show Mesh");
	menuMesh->Append(menubarID::ID_menubarDeleteMesh, "&Delete Mesh");
    
    /* Creates the menu listing of the help menu */
    menuHelp->Append(menubarID::ID_menubarManual, "View Manual");
    menuHelp->AppendSeparator();
    menuHelp->Append(menubarID::ID_menubarLicense, "License");
    menuHelp->Append(wxID_ABOUT);
	
	/*Create the menu listing of the Problem Menu */
	menuProblem->Append(menubarID::ID_menubarPrecision, "&Set Precision");
    
    /* Create and display the menu bar */
    SetMenuBar(menuBar);
    CreateStatusBar();
    
    SetStatusText("Omni-FEM Simulator");

	createTopToolBar();
	this->GetClientSize(&clientSizeWidth, &clientSizeLength);
	
	createInitialStartupClient();
	enableToolMenuBar(false);
	
	
	this->SetMinSize(minSize);
	this->SetMaxSize(minSize);
	this->SetInitialSize(minSize);
	
	arrayPhysicsProblem.Add("Electrostatics");
	arrayPhysicsProblem.Add("Magnetics");
}
Beispiel #2
0
OmniFEMMainFrame::OmniFEMMainFrame(const wxString &title, const wxPoint &pos, const wxSize &size) : wxFrame(NULL, wxID_ANY, title, pos, size)
{
	minSize = size;
	
    /* This creates the main menu Bar at the top */
    menuBar->Append(menuFile, "&File");
    menuBar->Append(menuEdit, "&Edit");
    menuBar->Append(menuView, "&View");
    menuBar->Append(menuProblem, "&Problem");
    menuBar->Append(menuGrid, "&Grid");
    menuBar->Append(menuProperties, "&Properties");
    menuBar->Append(menuMesh, "&Mesh");
    menuBar->Append(menuHelp, "&Help");
    
    
    /* Creating the menu listing of File menu */
    menuFile->Append(menubarID::ID_menubarNew, "&New\tCtrl-N");
    menuFile->Append(menubarID::ID_menubarSave, "&Save\tCtrl-S");
    menuFile->Append(menubarID::ID_menubarSaveAs, "&Save As");
	menuFile->Append(menubarID::ID_menubarOpen, "&Open");
    menuFile->AppendSeparator();
    menuFile->Append(wxID_EXIT);
    
    /* Creating the menu listinging of the Edit Menu */
	menuEdit->Append(menubarID::ID_menubarLUASCRIPT, "&Lua Script\tCtrl-L");
    menuEdit->Append(menubarID::ID_menubarPreferences, "&Preferences\tCtrl-P");
	
	/* Creting the menu listing of the View Menu */
	menuView->Append(menubarID::ID_menubarViewResults, "&View Results");
    menuView->AppendSeparator();
    menuView->Append(menubarID::ID_menubarDispBlockLabels, "&Show Block Name");
	menuView->Append(menubarID::ID_menubarDispStatusBar, "&Show Status Bar");
    menuView->Append(menubarID::ID_menubarDispLuaConsole, "&Lua Console");
    
    /* Create hte menu listing for the grid menu option */
    menuGrid->Append(menubarID::ID_menubarShowGrid, "&Display Grid");
    menuGrid->Append(menubarID::ID_menubarSnapGrid, "&Snap to Grid");
    menuGrid->Append(menubarID::ID_menubarSetGrid, "&Set Grid");
    
    /* Create the menu listing for the properties option */
    menuProperties->Append(menubarID::ID_menubarMaterials, "&Materials\tCtrl-M");
    menuProperties->Append(menubarID::ID_menubarBoundary, "&Boundary Conditions\tCtrl-B");
    menuProperties->Append(menubarID::ID_menubarPoint, "&Nodal Properties");
    menuProperties->Append(menubarID::ID_menubarCircuitsCond, "&Circuits/Conductors");
    menuProperties->AppendSeparator();
    menuProperties->Append(menubarID::ID_menubarMatLibrary, "&Materials Library\tCtrl-L");
    
    
	/* Create the menu listing for the mesh menu */
	menuMesh->Append(menubarID::ID_menubarCreateMesh, "&Create Mesh");
	menuMesh->Append(menubarID::ID_menubarShowMesh, "&Show Mesh");
	menuMesh->Append(menubarID::ID_menubarDeleteMesh, "&Delete Mesh");
    
    /* Creates the menu listing of the help menu */
    menuHelp->Append(menubarID::ID_menubarManual, "View Manual");
    menuHelp->AppendSeparator();
    menuHelp->Append(menubarID::ID_menubarLicense, "License");
    menuHelp->Append(wxID_ABOUT);
	
	/*Create the menu listing of the Problem Menu */
	menuProblem->Append(menubarID::ID_menubarPrecision, "&Set Precision");
    
    /* Create and display the menu bar */
    SetMenuBar(menuBar);
    CreateStatusBar();
    
    SetStatusText("Omni-FEM Simulator");

	createTopToolBar();
	this->GetClientSize(&clientSizeWidth, &clientSizeLength);
	
	createInitialStartupClient();
	enableToolMenuBar(false);
	
	
	this->SetMinSize(minSize);
	this->SetMaxSize(minSize);
	this->SetInitialSize(minSize);
	
	arrayPhysicsProblem.Add("Electrostatics");
	arrayPhysicsProblem.Add("Magnetics");
}