Esempio n. 1
0
void CalReviewDialog::CreateControls()
{
    CalReviewDialog* parent = this;
    wxBoxSizer* topVSizer = new wxBoxSizer(wxVERTICAL);
    parent->SetSizer(topVSizer);

    wxNotebook* calibNotebook = new wxNotebook(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP);

    wxPanel* panelMount = new wxPanel(calibNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL);
    CreatePanel(panelMount, false);
    panelMount->SetBackgroundColour("BLACK");

    calibNotebook->AddPage(panelMount, _("Mount"));

    // Build the AO panel only if an AO is configured
    if (pSecondaryMount)
    {
        wxPanel* panelAO = new wxPanel(calibNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER | wxTAB_TRAVERSAL);
        CreatePanel(panelAO, true);
        panelAO->SetBackgroundColour("BLACK");
        calibNotebook->AddPage(panelAO, _("AO"));
    }

    topVSizer->Add(calibNotebook, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
    AddButtons(this, topVSizer);                              // virtual function
}
void CBCGPRibbonConstructor::ConstructCategory (CBCGPRibbonCategory& category, const CBCGPRibbonInfo::XCategory& info) const
{
	const_cast<CBCGPToolBarImages&>(info.m_SmallImages.m_Image).CopyTo (category.GetSmallImages ());
	const_cast<CBCGPToolBarImages&>(info.m_LargeImages.m_Image).CopyTo (category.GetLargeImages ());

	category.SetKeys (info.m_strKeys);

	int i = 0;
	for (i = 0; i < info.m_arPanels.GetSize (); i++)
	{
		const CBCGPRibbonInfo::XPanel& infoPanel = 
			*(const CBCGPRibbonInfo::XPanel*)info.m_arPanels[i];

		CBCGPRibbonPanel* pPanel = CreatePanel (category, infoPanel);
		if (pPanel != NULL)
		{
			ASSERT_VALID (pPanel);
			ConstructPanel (*pPanel, infoPanel);
		}
	}

	for (i = 0; i < info.m_arElements.GetSize (); i++)
	{
		CBCGPBaseRibbonElement* pElement = 
			CreateElement (*(const CBCGPRibbonInfo::XElement*)info.m_arElements[i]);

		if (pElement != NULL)
		{
			ASSERT_VALID (pElement);
			category.AddHidden (pElement);
		}
	}

	category.SetCollapseOrder (info.m_arCollapseOrder);
}
Esempio n. 3
0
PrismWindow::PrismWindow(wxWindow *parent,NodeTree *obj,const wxString& title, const wxPoint& pos,const wxSize& size)
	: wxPanel(parent, wxID_ANY, pos, size)
{
	node=obj;
	worldView=false;
	CreatePanel();
}
Esempio n. 4
0
FilePanels::FilePanels():
	LastLeftFilePanel(0),
	LastRightFilePanel(0),
	LeftPanel(CreatePanel(Opt.LeftPanel.Type)),
	RightPanel(CreatePanel(Opt.RightPanel.Type)),
	ActivePanel(0),
	LastLeftType(0),
	LastRightType(0),
	LeftStateBeforeHide(0),
	RightStateBeforeHide(0)
{
	_OT(SysLog(L"[%p] FilePanels::FilePanels()", this));
	MacroMode = MACRO_SHELL;
	KeyBarVisible = Opt.ShowKeyBar;
//  SetKeyBar(&MainKeyBar);
//  _D(SysLog(L"MainKeyBar=0x%p",&MainKeyBar));
}
Esempio n. 5
0
FaceWidget::FaceWidget(wxWindow *parent,SimulatedWorld *simu,const wxPoint& pos,const wxSize& size,bool horizontal,bool pre)
: wxPanel(parent, wxID_ANY, pos, size)
{
	noPreliminar3D=pre;
	world=simu;
	worldView=false;
	CreatePanel();
}
void CameraCalibration::InitPangolin(int PanelWidth)
{

	if(stereo_mode)
	{
		const int WindowWidth = (ImageSize.width)*2+PanelWidth-1;
		const int WindowHeight = ImageSize.height;

		// Create OpenGL window in single line thanks to GLUT
		CreateGlutWindowAndBind("Main", WindowWidth, WindowHeight, GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_MULTISAMPLE);
		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

		// Issue specific OpenGl we might need
		glEnable (GL_BLEND);
		glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

		//GLenum err = glewInit();
		//if(GLEW_OK != err)
		//{
		//    cerr << "GLEW Error: " << glewGetErrorString(err) << endl;
		//    exit(0);
		//}

		panel = &CreatePanel("ui").SetBounds(1.0, 0.0, 0.0, (double)PanelWidth/DisplayBase().v.w);

		CamIntrins = new OpenGlMatrixSpec[2];

		CamIntrins[0] = ProjectionMatrixRDF_TopLeft(ImageSize.width,
													ImageSize.height,
													calib_params[0].CameraMatrix.at<double>(0, 0),
													calib_params[0].CameraMatrix.at<double>(1, 1),
													calib_params[0].CameraMatrix.at<double>(0, 2),
													calib_params[0].CameraMatrix.at<double>(1, 2),
													0.1,
													10000);

		CamIntrins[1] = ProjectionMatrixRDF_TopLeft(ImageSize.width,
													ImageSize.height,
													calib_params[1].CameraMatrix.at<double>(0, 0),
													calib_params[1].CameraMatrix.at<double>(1, 1),
													calib_params[1].CameraMatrix.at<double>(0, 2),
													calib_params[1].CameraMatrix.at<double>(1, 2),
													0.1,
													10000);

		const double panel = (double)(PanelWidth-1)/(double)(WindowWidth-1);
		const double middle_h = ((double)(WindowWidth-PanelWidth)/2.0)/(double)(WindowWidth) + (double)(PanelWidth)/(double)(WindowWidth);

		view[0] = &Display("ViewLeft").SetBounds(1.0, 0, panel, middle_h, -(double)ImageSize.width/(double)ImageSize.height);
		view[1] = &Display("ViewRight").SetBounds(1.0, 0, middle_h, 1.0, -(double)ImageSize.width/(double)ImageSize.height);
		
	}

	InitTexture();

	glutSpecialFunc(&SpecialKeyFunction);
}
Esempio n. 7
0
CreateComposed::CreateComposed(wxWindow *parent,NodeTree* nod,wxWindowID id,wxPoint Pos,wxSize siz)
:wxPanel(parent,wxID_ANY,Pos,siz)
{
	CreatePanel();
	type=0;
	creation=nod->pointer.composedentity;
	currentComp=creation;
	checkAddition=true;
}
Esempio n. 8
0
FaceWindow::FaceWindow(wxWindow *parent,NodeTree *obj,const wxString& title, const wxPoint& pos,const wxSize& size)
: wxPanel(parent, wxID_ANY, pos, size)
{
	mainWin=(MainWindow*)parent->GetParent();;
	node=obj;
	worldView=false;
	red=green=blue=1.0f;
	CreatePanel();
	align->SetSelection(1); //Set align OFF to start
}
Esempio n. 9
0
ConnectionLog::ConnectionLog(wxWindow *window,wxString name)
		:wxDialog(window,wxID_ANY,name ,wxPoint(0,0), wxSize(1210,250),wxCAPTION|wxRESIZE_BORDER|wxMINIMIZE_BOX|wxSYSTEM_MENU| wxDIALOG_NO_PARENT) 
									   
{
	parent=window;
	tittle=name;
	col=0;
	row=0;
	CreatePanel();

}
Esempio n. 10
0
void StoryWindow::CreateNprWindow(std::tuple<wxPanel*,wxStaticBoxSizer*,wxHtmlWindow*,wxString,wxString> &windowComponents)
{
	   std::get<0>(windowComponents) = CreatePanel();
	   std::get<1>(windowComponents) = CreateSizer(std::get<0>(windowComponents));
	   std::get<0>(windowComponents)->SetSizer( std::get<1>(windowComponents) );
	   std::get<0>(windowComponents)->Layout();
	   std::get<1>(windowComponents)->Fit( std::get<0>(windowComponents) );
	   std::get<2>(windowComponents) = CreateWindow(std::get<0>(windowComponents));
	   std::get<1>(windowComponents)->Add( std::get<2>(windowComponents), 0, wxALL, 5 );
	   m_notebook1->AddPage(std::get<0>(windowComponents), std::get<4>(windowComponents), false );
	   std::get<2>(windowComponents)->SetPage(std::get<3>(windowComponents));
}
Esempio n. 11
0
InitialProperties::InitialProperties(wxWindow *parent, NodeTree *obj, const wxString& title,wxWindowID id)
:wxDialog(parent,id, title, wxPoint(0,0), wxSize(300,500),wxDEFAULT_DIALOG_STYLE|wxSTAY_ON_TOP|wxMAXIMIZE_BOX ) 
{
	mainWin=(MainWindow*)parent;
	b_sel=true;
	worldView=true;
	node=obj;
	wID=id;
	defName=node->getSimu()->tree->GetItemText(node->getSimu()->tree->GetLastChild(node->getSimu()->tree->GetSelection()));
	CreatePanel();
	
}
Esempio n. 12
0
	bool EAHUDLayer::SetHUDText(const std::string& inText)
	{
		/*
		//begin  
		//this block intend to create a label with text "tank #1" and displayed in the scene  
		osg::ref_ptr<osgText::Text> tankLabel = new osgText::Text();  
		osg::ref_ptr<osg::Geode> textGeode = new osg::Geode;  

		tankLabel->setCharacterSize(2);  
		//tankLabel->setFont("D:\\OSG\\osg2.9\\OpenSceneGraph2.9.5\\data\\fonts\\times.ttf");  
		tankLabel->setText("tank #1");  
		tankLabel->setAxisAlignment(osgText::Text::SCREEN);  
		tankLabel->setDrawMode(osgText::Text::TEXT);  

		tankLabel->setAlignment(osgText::Text::CENTER_CENTER);  
		tankLabel->setPosition( osg::Vec3(0,0,4) );  
		tankLabel->setColor( osg::Vec4(0.0f, 1.0f, 0.0f, 1.0f) );  
		textGeode->addDrawable(tankLabel.get());  
		tankXForm->addChild(textGeode.get());  
		//end  
		*/

		osg::ref_ptr<osg::Group> root = _viewer->getSceneData()->asGroup();  
		osg::ref_ptr<osg::Geode> panelGeode = CreatePanel();
		//begin  
		//裁剪一个矩形,用来承装文字,并且不随场景的变化而变化  
		osg::ref_ptr<osg::Projection> HUDProjection = new osg::Projection;  
		HUDProjection->setMatrix(osg::Matrix::ortho2D(0,1366,0,768));  
		osg::ref_ptr<osg::MatrixTransform> HUDViewMatrix = new osg::MatrixTransform;  
		HUDViewMatrix->setMatrix(osg::Matrix::identity());  
		HUDViewMatrix->setReferenceFrame(osg::Transform::ABSOLUTE_RF); 
		HUDViewMatrix->addChild(panelGeode.get());
		HUDProjection->addChild(HUDViewMatrix.get());  
		//end  

		//begin  
		m_text = new osgText::Text; 
		m_text->setCharacterSize(30);  
		m_text->setFont("D:\\Program Files\\OpenSceneGraph\\data\\Fonts\\simhei.ttf");
		m_text->setText(inText);  
		m_text->setAlignment(osgText::Text::CENTER_CENTER);  
		m_text->setAxisAlignment(osgText::Text::SCREEN);  
		m_text->setPosition(osg::Vec3(100,20,-1.5));  
		m_text->setColor(osg::Vec4(199, 77, 15, 1));  
		panelGeode->addDrawable(m_text.get());
		//end
		root->addChild(HUDProjection.get());  
		/*root->addChild(tankXForm.get());  
		root->addChild(landTankNode.get());  */
		_viewer->setSceneData(root.get());
		_valid=true;
		return true;
	}
Esempio n. 13
0
void 	OnButtonModeView( GtkButton* button, int index_operation )
{
	ClassPanel* panel = (ClassPanel*) Panels[ActivePanel];
	gchar * path =  g_strdup(panel->MyPath);
	int mode=1-panel->MyMode;
	panel->DeInit();
	g_free(panel);
	
    CreatePanel(ActivePanel,mode);

	Panels[ActivePanel]->LoadDir(path);
	g_free(path);
}
Esempio n. 14
0
PositionableWidget::PositionableWidget(wxWindow *window,NodeTree *obj,const wxString label, const wxPoint& pos ,
									   const wxSize& size,bool sliders ,bool color_w,wxWindowID winid): wxPanel( window, wxID_ANY, pos, size)
									   
{
	wID=winid;
	slider=sliders;
	parent=window;
	name=label;
	defPosition=obj->pointer.positionableentity->getRelativePosition();
	obj->pointer.positionableentity->getRelativeOrientation(defOrientation.x,defOrientation.y,defOrientation.z);
	if(color_w)
		obj->pointer.solidentity->getColor(defRed,defGreen,defBlue);
	node=obj;
	CreatePanel(sliders,color_w);	
	

}
Esempio n. 15
0
HRESULT CreateTextPanel(CTextPanel* pTextPanel, const TEXTPANEL_PARAMS* pTextPanelParams)
{
	HRESULT hr=S_OK;
	if (FAILED(CreatePanel(pTextPanel, pTextPanelParams)))
	{
		hr=E_FAIL;
		goto e_exit;
	}

	pTextPanel->SetMargin(pTextPanelParams->uMargin);
	CUIFont *pFont;
	if (FAILED(g_pUIFontManager->LoadFont(pTextPanelParams->iSize, pTextPanelParams->uWeight, 
		pTextPanelParams->bItalic, pTextPanelParams->strFacename, pTextPanelParams->dwFontColor, 
		&pFont)))
	{
		hr=E_FAIL;
		goto e_exit;
	}
	pTextPanel->SetUIFont(pFont);

e_exit:
	return hr;
}
Esempio n. 16
0
Panel* FilePanels::ChangePanel(Panel *Current,int NewType,int CreateNew,int Force)
{
	Panel *NewPanel;
	SaveScreen *SaveScr=nullptr;
	// OldType не инициализировался...
	int OldType=Current->GetType(),X1,Y1,X2,Y2;
	int OldPanelMode=Current->GetMode();

	if (!Force && NewType==OldType && OldPanelMode==NORMAL_PANEL)
		return(Current);

	int UseLastPanel=0;
	int OldViewMode=Current->GetPrevViewMode();
	bool OldFullScreen=Current->IsFullScreen();
	int OldSortMode=Current->GetPrevSortMode();
	int OldSortOrder=Current->GetPrevSortOrder();
	int OldNumericSort=Current->GetPrevNumericSort();
	int OldCaseSensitiveSort=Current->GetPrevCaseSensitiveSort();
	int OldSortGroups=Current->GetSortGroups();
	int OldShowShortNames=Current->GetShowShortNamesMode();
	int OldFocus=Current->GetFocus();
	int OldSelectedFirst=Current->GetSelectedFirstMode();
	int OldDirectoriesFirst=Current->GetPrevDirectoriesFirst();
	int LeftPosition=(Current==LeftPanel);

	Panel *(&LastFilePanel)=LeftPosition ? LastLeftFilePanel:LastRightFilePanel;
	Current->GetPosition(X1,Y1,X2,Y2);
	int ChangePosition=((OldType==FILE_PANEL && NewType!=FILE_PANEL &&
	                    OldFullScreen) || (NewType==FILE_PANEL &&
	                                    ((OldFullScreen && !FileList::IsModeFullScreen(OldViewMode)) ||
	                                     (!OldFullScreen && FileList::IsModeFullScreen(OldViewMode)))));

	if (!ChangePosition)
	{
		SaveScr=Current->SaveScr;
		Current->SaveScr=nullptr;
	}

	if (OldType==FILE_PANEL && NewType!=FILE_PANEL)
	{
		delete Current->SaveScr;
		Current->SaveScr=nullptr;

		if (LastFilePanel!=Current)
		{
			DeletePanel(LastFilePanel);
			LastFilePanel=Current;
		}

		LastFilePanel->Hide();

		if (LastFilePanel->SaveScr)
		{
			LastFilePanel->SaveScr->Discard();
			delete LastFilePanel->SaveScr;
			LastFilePanel->SaveScr=nullptr;
		}
	}
	else
	{
		Current->Hide();
		DeletePanel(Current);

		if (OldType==FILE_PANEL && NewType==FILE_PANEL)
		{
			DeletePanel(LastFilePanel);
			LastFilePanel=nullptr;
		}
	}

	if (!CreateNew && NewType==FILE_PANEL && LastFilePanel)
	{
		int LastX1,LastY1,LastX2,LastY2;
		LastFilePanel->GetPosition(LastX1,LastY1,LastX2,LastY2);

		if (LastFilePanel->IsFullScreen())
			LastFilePanel->SetPosition(LastX1,Y1,LastX2,Y2);
		else
			LastFilePanel->SetPosition(X1,Y1,X2,Y2);

		NewPanel=LastFilePanel;

		if (!ChangePosition)
		{
			if ((NewPanel->IsFullScreen() && !OldFullScreen) ||
			        (!NewPanel->IsFullScreen() && OldFullScreen))
			{
				Panel *AnotherPanel=GetAnotherPanel(Current);

				if (SaveScr && AnotherPanel->IsVisible() &&
				        AnotherPanel->GetType()==FILE_PANEL && AnotherPanel->IsFullScreen())
					SaveScr->Discard();

				delete SaveScr;
			}
			else
				NewPanel->SaveScr=SaveScr;
		}

		if (!OldFocus && NewPanel->GetFocus())
			NewPanel->KillFocus();

		UseLastPanel=TRUE;
	}
	else
		NewPanel=CreatePanel(NewType);

	if (Current==ActivePanel)
		ActivePanel=NewPanel;

	if (LeftPosition)
	{
		LeftPanel=NewPanel;
		LastLeftType=OldType;
	}
	else
	{
		RightPanel=NewPanel;
		LastRightType=OldType;
	}

	if (!UseLastPanel)
	{
		if (ChangePosition)
		{
			if (LeftPosition)
			{
				NewPanel->SetPosition(0,Y1,ScrX/2-Opt.WidthDecrement,Y2);
				RightPanel->Redraw();
			}
			else
			{
				NewPanel->SetPosition(ScrX/2+1-Opt.WidthDecrement,Y1,ScrX,Y2);
				LeftPanel->Redraw();
			}
		}
		else
		{
			NewPanel->SaveScr=SaveScr;
			NewPanel->SetPosition(X1,Y1,X2,Y2);
		}

		NewPanel->SetSortMode(OldSortMode);
		NewPanel->SetSortOrder(OldSortOrder);
		NewPanel->SetNumericSort(OldNumericSort);
		NewPanel->SetCaseSensitiveSort(OldCaseSensitiveSort);
		NewPanel->SetSortGroups(OldSortGroups);
		NewPanel->SetShowShortNamesMode(OldShowShortNames);
		NewPanel->SetPrevViewMode(OldViewMode);
		NewPanel->SetViewMode(OldViewMode);
		NewPanel->SetSelectedFirstMode(OldSelectedFirst);
		NewPanel->SetDirectoriesFirst(OldDirectoriesFirst);
	}

	return(NewPanel);
}
Esempio n. 17
0
wxPanel *RenderableEffect::GetPanel(wxWindow *parent) {
    if (panel == nullptr) {
        panel = CreatePanel(parent);
    }
    return panel;
}