Пример #1
0
WxAnimTreeEditorToolBar::WxAnimTreeEditorToolBar( wxWindow* InParent, wxWindowID InID )
	:	wxToolBar( InParent, InID, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxTB_3DBUTTONS )
{
	// create the return to parent sequence button
	TickTreeB.Load(TEXT("AnimTree_TickTree"));
	PreviewNodeB.Load(TEXT("AnimTree_PrevNode"));
	ShowNodeWeightB.Load(TEXT("AnimTree_ShowNodeWeight"));
	ShowBonesB.Load(TEXT("AnimTree_ShowBones"));
	ShowBoneNamesB.Load(TEXT("AnimTree_ShowBoneNames"));
	ShowWireframeB.Load(TEXT("AnimTree_ShowWireframe"));
	ShowFloorB.Load(TEXT("AnimTree_ShowFloor"));
	CurvesB.Load(TEXT("KIS_DrawCurves"));

	SetToolBitmapSize( wxSize( 16, 16 ) );

	AddSeparator();
	AddCheckTool(IDM_ANIMTREE_TOGGLETICKTREE, TEXT("PauseAnimTree"), TickTreeB, wxNullBitmap, TEXT("PauseAnimTree"));
	AddSeparator();
	AddTool(IDM_ANIMTREE_PREVIEWSELECTEDNODE, PreviewNodeB, TEXT("PreviewSelectedNode"));
	AddCheckTool(IDM_ANIMTREE_SHOWNODEWEIGHT, TEXT("ShowNodeWeight"), ShowNodeWeightB, wxNullBitmap, TEXT("ShowNodeWeight"));
	AddSeparator();
	AddCheckTool(IDM_ANIMTREE_SHOWHIERARCHY, TEXT("ShowSkeleton"), ShowBonesB, wxNullBitmap, TEXT("ShowSkeleton"));
	AddCheckTool(IDM_ANIMTREE_SHOWBONENAMES, TEXT("ShowBoneNames"), ShowBoneNamesB, wxNullBitmap, TEXT("ShowBoneNames"));
	AddCheckTool(IDM_ANIMTREE_SHOWWIREFRAME, TEXT("ShowWireframe"), ShowWireframeB, wxNullBitmap, TEXT("ShowWireframe"));
	AddCheckTool(IDM_ANIMTREE_SHOWFLOOR, TEXT("ShowFloor"), ShowFloorB, wxNullBitmap, TEXT("ShowFloor"));
	AddCheckTool(IDM_ANIMTREE_SHOWCURVES, TEXT("ToggleCurvedConnections"), CurvesB, wxNullBitmap, TEXT("ToggleCurvedConnections"));

	Realize();
}
Пример #2
0
//------------------------------------------------------------------------------
// void CreateMissionTreeToolBar()
//------------------------------------------------------------------------------
void MissionTreeToolBar::CreateMissionTreeToolBar()
{
   // Load toolbar icons
   GuiItemManager *guiManager = GuiItemManager::GetInstance();
   const int NUM_ICONS = 14;
   wxBitmap* bitmaps[NUM_ICONS];
   int index = -1;
   long bitmapType = wxBITMAP_TYPE_PNG;
   
   // Do not change the order, this order is how it appears in the toolbar
   
   guiManager->LoadIcon("mtc_ClearFilters", bitmapType, &bitmaps[++index], mtc_ClearFilters_xpm);
   guiManager->LoadIcon("mtc_LA", bitmapType, &bitmaps[++index], mtc_LA_xpm);
   guiManager->LoadIcon("mtc_L1", bitmapType, &bitmaps[++index], mtc_L1_xpm);
   guiManager->LoadIcon("mtc_L2", bitmapType, &bitmaps[++index], mtc_L2_xpm);
   guiManager->LoadIcon("mtc_L3", bitmapType, &bitmaps[++index], mtc_L3_xpm);
   guiManager->LoadIcon("mtc_IncPhysics", bitmapType, &bitmaps[++index], mtc_IncPhysics_xpm);
   guiManager->LoadIcon("mtc_IncSolver", bitmapType, &bitmaps[++index], mtc_IncSolver_xpm);
   guiManager->LoadIcon("mtc_IncScriptEvent", bitmapType, &bitmaps[++index], mtc_IncScriptEvent_xpm);
   guiManager->LoadIcon("mtc_IncControlFlow", bitmapType, &bitmaps[++index], mtc_IncControlFlow_xpm);
   guiManager->LoadIcon("mtc_ExcReport", bitmapType, &bitmaps[++index], mtc_ExcReport_xpm);
   guiManager->LoadIcon("mtc_ExcEquation", bitmapType, &bitmaps[++index], mtc_ExcEquation_xpm);
   guiManager->LoadIcon("mtc_ExcPlot", bitmapType, &bitmaps[++index], mtc_ExcPlot_xpm);
   guiManager->LoadIcon("mtc_ExcCall", bitmapType, &bitmaps[++index], mtc_ExcCall_xpm);
   guiManager->LoadIcon("mtc_CustomView", bitmapType, &bitmaps[++index], mtc_CustomView_xpm);
   
   index = 0;
   AddCheckTool(TOOL_CLEAR_FILTERS, wxT("ClearFilters"), *bitmaps[index],
                                 *bitmaps[index], wxT("Show All"));
   AddSeparator();
   ++index;
   AddCheckTool(TOOL_LEVEL_ALL, wxT("LevelA"), *bitmaps[index],
                                 *bitmaps[index], wxT("Expand All Levels"));
   ++index;
   AddCheckTool(TOOL_LEVEL_1, wxT("Level1"), *bitmaps[index],
                                 *bitmaps[index], wxT("Expand One Level"));
   ++index;
   AddCheckTool(TOOL_LEVEL_2, wxT("Level2"), *bitmaps[index],
                                 *bitmaps[index], wxT("Expand Two Levels"));
   ++index;
   AddCheckTool(TOOL_LEVEL_3, wxT("Level3"), *bitmaps[index],
                                 *bitmaps[index], wxT("Expand Three Levels"));
   AddSeparator();
   ++index;
   AddCheckTool(TOOL_INC_PHYSICS, wxT("IncPhysics"), *bitmaps[index],
                                 *bitmaps[index], wxT("Include Physics Related commands"));
   ++index;
   AddCheckTool(TOOL_INC_SOLVER, wxT("IncSolver"), *bitmaps[index],
                                 *bitmaps[index], wxT("Include Solver Related commands"));
   ++index;
   AddCheckTool(TOOL_INC_SCRIPT, wxT("IncScript"), *bitmaps[index],
                                 *bitmaps[index], wxT("Include ScriptEvent"));
   ++index;
   AddCheckTool(TOOL_INC_CONTROL, wxT("IncControl"), *bitmaps[index],
                                 *bitmaps[index], wxT("Include Control Flow"));
   AddSeparator();
   ++index;
   AddCheckTool(TOOL_EXC_REPORT, wxT("ExcReport"), *bitmaps[index],
                                 *bitmaps[index], wxT("Exclude Report"));
   ++index;
   AddCheckTool(TOOL_EXC_EQUATION, wxT("ExcEquation"), *bitmaps[index],
                                 *bitmaps[index], wxT("Exclude Equation"));
   ++index;
   AddCheckTool(TOOL_EXC_PLOT, wxT("ExcPlot"), *bitmaps[index],
                                 *bitmaps[index], wxT("Exclude Toggle, PenUp/Down, ClearPlot, and MarkPoint commands"));
   ++index;
   AddCheckTool(TOOL_EXC_CALL, wxT("ExcCall"), *bitmaps[index],
                                 *bitmaps[index], wxT("Exclude CallFunction, Save commands"));
   // Commented out until GMT-2855 is resolved
   // Commented out button create code until Customize View Window is completely fixed
   // TGG: 2012-07-31
   //AddSeparator();
   //++index;
   //AddTool(TOOL_CUSTOM_VIEW, wxT("CustomizeView"), *bitmaps[index],
   //                         wxT("Customize Mission Tree View"));
   Realize();
   
   for (int i = 0; i < NUM_ICONS; i++)
      delete bitmaps[i];
}