VOID CActionSystem::MainMenuBar_SetID(INT nIndex, INT idType,INT idData)
{
	if(nIndex < 0 || nIndex > 20) return;

	if(idType == INVALID_ID)
	{
		m_barMain[nIndex].typeItem = AOT_EMPTY;
		m_barMain[nIndex].idImpl = INVALID_ID;
		m_barMain[nIndex].idActionItem = INVALID_ID;

		UpdateToolBar();
		return;
	}

	switch(idType)
	{
	case AOT_SKILL:
		{
			m_barMain[nIndex].typeItem = AOT_SKILL;
			m_barMain[nIndex].idImpl = idData;
			m_barMain[nIndex].idActionItem = INVALID_ID;
		}
		break;
	case AOT_ITEM:
		{
			m_barMain[nIndex].typeItem = AOT_ITEM;
			m_barMain[nIndex].idImpl = idData;
			m_barMain[nIndex].idActionItem = INVALID_ID;

		}
		break;
	case AOT_PET_SKILL:
		{
			m_barMain[nIndex].typeItem = AOT_PET_SKILL;
			m_barMain[nIndex].idImpl = idData & 0xFFFF;
			m_barMain[nIndex].idActionItem = INVALID_ID;
			m_barMain[nIndex].idPetIndex = (idData >> 16) & 0xFFFF;
		}
		break;

	default:
		break;
	}
	
//	if(nIndex == 9)
//		m_bIsInitalDone = TRUE;

	UpdateToolBar();
}
示例#2
0
/*
 * NewToolBar - create a new brand tool bar
 */
void NewToolBar( RECT *rect )
{
    ss          *curr;
    RECT        covered;

    if( toolBar ) {
        userClose = false;
        CloseToolBar();
        userClose = true;
    }
    if( !EditFlags.Toolbar ) {
        return;
    }
    createToolBar( rect );
    curr = toolBarHead;
    while( curr != NULL ) {
        addToolBarItem( (tool_item *)curr );
        curr = curr->next;
    }
    UpdateToolBar( toolBar );
    covered = *rect;
    covered.bottom = rect->top;
    covered.top = 0;
    InvalidateRect( edit_container_id, &covered, FALSE );

} /* NewToolBar */
示例#3
0
LRESULT CVariablePage::OnSetActive(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	int iCurClass = 0;
	if (!m_bOnlyDlgs)
		iCurClass = *m_piCurrentClass;
	else
	{
		int Count = -1;
		for (size_t i = 0; i < m_pClassVector->GetCount(); i++)
		{
			VSClass* pCurClass = (*m_pClassVector)[i];
			if (pCurClass->m_eDialog == eTrue)
			{
				Count++;
				if (i >= (size_t)*m_piCurrentClass)
				{
					break;
				}
			}
		}
		iCurClass = Count;

	}
	m_Classes.SetCurSel(iCurClass);
	OnCbnSelchange(CBN_SELCHANGE, IDC_COMBO_CLASSES, NULL, bHandled);
	UpdateToolBar((HWND)wParam);
	return 0;
}
VOID CActionSystem::UpdateAction_FromSkill(const SCLIENT_SKILL* pSkill)
{
	TDAssert(pSkill);

	//检查时候已经有该操作
	CActionItem_Skill* pSkillAction = (CActionItem_Skill*)GetAction_SkillID(pSkill->m_pDefine->m_nID*100 + pSkill->m_nLevel);
	
	//AxTrace(0, 0, "Skill:%d", pSkill->m_pDefine->m_dwID);
	//如果没有,创建
	if(!pSkillAction)
	{
		pSkillAction = new CActionItem_Skill(_CreateID());
		pSkillAction->Update_Skill(pSkill);
		//INT nPos = pSkillAction->GetPosIndex();
		//加入
		m_mapAllAction[pSkillAction->GetID()] = pSkillAction;
		UpdateToolBar();

		//如果有上次存的默认技能,则设置为它。
		if( pSkill->m_pDefine->m_nID*100 + pSkill->m_nLevel == CGameProcedure::s_pVariableSystem->GetAs_Int("DefaultSkill") )
		{
			CGameInterface::GetMe()->Skill_SetActive(pSkillAction);
		}
	}
	else
	{
		pSkillAction->Update_Skill(pSkill);
	}

}
VOID CActionSystem::UpdateAction_FromItem(tObject_Item* pItem)
{
	TDAssert(pItem);

	//检查时候已经有该操作
	CActionItem_Item* pItemAction = (CActionItem_Item*)GetAction_ItemID(pItem->GetID());

	//如果没有,创建
	if(!pItemAction)
	{
		pItemAction = new CActionItem_Item(_CreateID());
		pItemAction->Update_Item(pItem);
		
		//加入链表
		m_mapAllAction[pItemAction->GetID()] = pItemAction;
		UpdateToolBar();
	}
	//如果有,更新
	else
	{
		pItemAction->Update_Item(pItem);
		for(INT i=0; i<(INT)m_barMain.size(); i++)
		{
			ACTIONBAR_ITEM& barItem = m_barMain[i];

			if(barItem.idImpl == pItem->GetIdTable())
			{
				MainMenuBar_Set(i,pItemAction->GetID());
			}
		}
	}
}
示例#6
0
bool ClangPlugin::BuildToolBar(wxToolBar* toolBar)
{
    for ( std::vector<ClangPluginComponent*>::iterator it = m_ComponentList.begin(); it != m_ComponentList.end(); ++it)
    {
        if ( (*it)->BuildToolBar(toolBar) )
        {
            return true;
        }
    }
    ClangToolbar* pToolbar = new ClangToolbar();
    pToolbar->OnAttach(this);

    // TODO: Replay some events?
    Manager::Get()->GetEditorManager()->SetActiveEditor( Manager::Get()->GetEditorManager()->GetActiveEditor() );

    m_ComponentList.push_back( pToolbar );
    return pToolbar->BuildToolBar(toolBar);
#if 0
    // load the toolbar resource
    Manager::Get()->AddonToolBar(toolBar,_T("codecompletion_toolbar"));
    // get the wxChoice control pointers
    m_Function = XRCCTRL(*toolBar, "chcCodeCompletionFunction", wxChoice);
    m_Scope    = XRCCTRL(*toolBar, "chcCodeCompletionScope",    wxChoice);

    m_ToolBar = toolBar;

    // set the wxChoice and best toolbar size
    UpdateToolBar();

    // disable the wxChoices
    EnableToolbarTools(false);

    return true;
    #endif
}
void CDlgTaxiwayConstraint::OnNewData()
{
	if (m_nCurNodeCount <= 0)
	{
		MessageBox("The taxiway have not nodes!");
		return;
	}
	if (!m_bSameTaxiway)
	{
		m_listTaxiway.KillCombofocus();
        SetCurNodList();
        m_bSameTaxiway = TRUE;
	}

	// data handling
	CTaxiwayConstraintData* pNewData = new CTaxiwayConstraintData();
	pNewData->SetFromID(m_nCurFirtNodeID);
	pNewData->SetToID(m_nCurFirtNodeID);
	pNewData->SetMaxNumber(0);
	pCurTaxiwayItem->AddItem(pNewData);

	// control handling
	int nId = m_listData.GetItemCount();
	CString strTemp;
	strTemp = m_strListNode.GetCount() > 0 ? m_strListNode.GetHead() : "No Node";
	m_listData.InsertItem(nId, strTemp);
	m_listData.SetItemText(nId, 1, strTemp);
	m_listData.SetItemText(nId, 2, "0");
	m_listData.SetItemData(nId, (DWORD_PTR)pNewData);

	UpdateToolBar();
}
VOID CActionSystem::UpdateAction_FromChatMood(const TALK_ACT_STRUCT* pActStruct)
{
	CActionItem_ChatMood* pChatMood = (CActionItem_ChatMood*)GetAction_ChatMoodID(pActStruct->m_actIdx);

	if(!pChatMood)
	{
		pChatMood = new CActionItem_ChatMood(_CreateID());
		pChatMood->Update_ChatMood(pActStruct);

		m_mapAllAction[pChatMood->GetID()] = pChatMood;
		UpdateToolBar();
	}
	else
	{
		pChatMood->Update_ChatMood(pActStruct);
		UpdateToolBar();
	}
}
示例#9
0
// Update display
void V4StudioFrame::Update() 
{
	if (m_pV4sm){
		if (m_pV4sm->GetGPACPanel()) m_pV4sm->GetGPACPanel()->Update();
		treeView->Refresh(m_pV4sm->GetRootNode());
	} else {
		treeView->Refresh(NULL);
	}
	UpdateToolBar();
}
void CDlgTaxiwayConstraint::OnLbnSelchangeListTaxiway()
{
	UpdateToolBar();
	int nSel = m_listTaxiway.GetCurSel();
	if (nSel == LB_ERR)
	{
		m_listData.DeleteAllItems();
		return;
	}
	SetCurNodList();
	m_bSameTaxiway = TRUE;

	pCurTaxiwayItem = m_pTaxiwayConstraintList->GetItem(nSel);

	// get taxiway name
	int nTaxiwayID = pCurTaxiwayItem->GetTaxiwayID();
	Taxiway taxiway;
	taxiway.ReadObject(nTaxiwayID);

	CString strTaxiway;
	strTaxiway.Format("%s", taxiway.GetObjNameString());

	for (int i = 0; i < pCurTaxiwayItem->GetItemCount(); i++)
	{
		CTaxiwayConstraintData* pCurData = pCurTaxiwayItem->GetItem(i);

		CString strFrom;
		CString strTo;
		CString strMaxNumber;

		std::vector<IntersectionNode>::iterator iter = m_vNodeList.begin();
		for (; iter != m_vNodeList.end(); ++iter)
		{
			/*CString strObjName;
			ALTObject * pObj = (*iter).GetOtherObject(nTaxiwayID);
			if(pObj)
				strObjName = pObj->GetObjNameString();*/

			if (pCurData->GetFromID() == (*iter).GetID())
			{
				strFrom = iter->GetName(); //Format("(%s) & (%s)-%d", strTaxiway, strObjName, ((*iter).GetIndex())+1);
			}
			if (pCurData->GetToID() == (*iter).GetID())
			{
				strTo = iter->GetName(); //Format("(%s) & (%s)-%d", strTaxiway, strObjName, ((*iter).GetIndex())+1);
			}			
		}
		strMaxNumber.Format("%d", pCurData->GetMaxNumber());

		m_listData.InsertItem(i, strFrom);
		m_listData.SetItemText(i, 1, strTo);
		m_listData.SetItemText(i, 2, strMaxNumber);
		m_listData.SetItemData(i, (DWORD_PTR)pCurData);
	}
}
示例#11
0
LRESULT CFunctionPage::OnSetActive(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	int iCurSel = m_ClassCombo.GetCurSel();
	if (iCurSel != *m_piCurrentClass)
	{
		m_ClassCombo.SetCurSel(*m_piCurrentClass);
		OnCbnSelchangeComboClass(CBN_SELCHANGE, 0, NULL, bHandled);
	}
	UpdateToolBar((HWND)wParam);
	return 0;
}
示例#12
0
void V4StudioFrame::UpdateSelection(GF_Node *node, GF_Node *parent) 
{
	SetSelection(node);
	SetParentSelection(parent);
	m_pMainToolbar->EnableTool(TOOL_EDIT_CUT, true);
	m_pMainToolbar->EnableTool(TOOL_EDIT_COPY, true);
	m_pMainToolbar->EnableTool(TOOL_EDIT_DELETE, true);
	UpdateToolBar();
	fieldView->SetNode(node);
	fieldView->Create();
}
示例#13
0
XyzGL::XyzGL(const QGLFormat& format,int view_type , QWidget* parent ,XyzWindow *mainWindow): QGLWidget(format,parent)
{
	qDebug()<<"XyzGL";
	mWin = mainWindow;
	mMousePressed = false;
	mClosing = false;
	mFirstDraw = true;
	mViewtype = view_type;
	mIsDynamicView = false;
	mViewTimer = new QTimer(this);
	mWay = LEFT;
	connect(mViewTimer , SIGNAL(timeout()) , this , SLOT(DynamicView()));
	connect(this , SIGNAL(ChangeView()) , mWin , SLOT(UpdateToolBar()));
}
示例#14
0
VOID CActionSystem::UpdateAction_FromPetSkill(INT nPetNum,const PET_SKILL* pSkill)
{
	TDAssert(pSkill);

	//检查时候已经有该操作

	CActionItem_PetSkill* pSkillAction = (CActionItem_PetSkill*)GetAction_PetSkillID(nPetNum,pSkill->m_pDefine->m_nID);
	
	//AxTrace(0, 0, "Skill:%d", pSkill->m_pDefine->m_dwID);
	//如果没有,创建
	if(!pSkillAction)
	{
		pSkillAction = new CActionItem_PetSkill(_CreateID());
		pSkillAction->Update_PetSkill(pSkill);
		//加入
		m_mapAllAction[pSkillAction->GetID()] = pSkillAction;
		UpdateToolBar();
	}
	else
	{
		pSkillAction->Update_PetSkill(pSkill);
		UpdateToolBar();
	}
}
void CDlgTaxiwayConstraint::OnDelData()
{
	POSITION pos = m_listData.GetFirstSelectedItemPosition();
	if (pos != NULL)
	{
		while (pos)
		{
			int nItem = m_listData.GetNextSelectedItem(pos);
			CTaxiwayConstraintData* pDelData = (CTaxiwayConstraintData*)(m_listData.GetItemData(nItem));
			pCurTaxiwayItem->DelItem(pDelData);
			m_listData.DeleteItemEx(nItem);
		}
	}

	UpdateToolBar();
}
void CDlgItinerantTraffic::OnDeleteItem()
{
	ASSERT(::IsWindow(m_wndListCtrl.m_hWnd));

	POSITION pos = m_wndListCtrl.GetFirstSelectedItemPosition();
	if (pos != NULL)
	{
		while (pos)
		{
			int nItem = m_wndListCtrl.GetNextSelectedItem(pos);
//TODO
			m_wndListCtrl.DeleteItemEx(nItem);
			m_pItinerantFlightList->DeleteItem(nItem);
		}
	}

	GetDlgItem(IDC_SAVE)->EnableWindow();
	UpdateToolBar();
}
void CDlgItinerantTraffic::InitToolBar()
{
	ASSERT(::IsWindow(m_wndToolBar.m_hWnd));
	CRect rectToolBar;
	GetDlgItem(IDC_STATIC_TOOLBARCONTENTER)->GetWindowRect(&rectToolBar);
	ScreenToClient(&rectToolBar);
	rectToolBar.left += 3;
	rectToolBar.top += 5;
	m_wndToolBar.MoveWindow(&rectToolBar);
	m_wndToolBar.ShowWindow(SW_SHOW);
	GetDlgItem(IDC_STATIC_TOOLBARCONTENTER)->ShowWindow(SW_HIDE);

	CToolBarCtrl& toolbar = m_wndToolBar.GetToolBarCtrl();
	toolbar.SetCmdID(0, ID_NEW_ITEM);
	toolbar.SetCmdID(1, ID_DEL_ITEM);
	toolbar.SetCmdID(2, ID_EDIT_ITEM);

	UpdateToolBar();
}
void CDlgTaxiwayConstraint::OnNewTaxiway()
{
	// data handling
	if (m_nTaxiwayCount <= 0)
	{
		MessageBox("You have not established the taxiway!");
		return;
	}

	pCurTaxiwayItem = new CTaxiwayConstraint();
	int nCurTaxiwayID = m_vTaxiwaysIDs.at(0);	

	pCurTaxiwayItem->SetTaxiwayID(nCurTaxiwayID);	
	m_pTaxiwayConstraintList->AddItem(pCurTaxiwayItem);

	// control handling
	m_listTaxiway.AddItem(&m_strListTaxiway);
	int nSel = m_listTaxiway.GetCurSel();
	m_listTaxiway.SetItemData(nSel, (DWORD_PTR)nCurTaxiwayID);
    SetCurNodList();
	m_bSameTaxiway = FALSE;

	UpdateToolBar();
}
示例#19
0
LRESULT CALLBACK LangBuilderProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
	hDlg = hWnd;

	static int show = 0;
	if ( show )
		OutDebugs( "LangBuilderProc: Message = %d, Wparam = %d, Lparam = %d", message, wParam, lParam );
	switch (message)
	{
        case WM_DESTROY:
			DestroyWindow( hWndLangBuilderListView );
            break;
        case WM_INITDIALOG:
			InitLanguageDialog();
			return 0;
		case WM_SETCURSOR:
			UpdateToolBar(hWnd, GetWindowLong((HWND)wParam, GWL_ID ));
			break;
		case WM_COMMAND:
			switch( LOWORD(wParam) ){
					break;
				case IDC_LANGTOKEN_UPDATE:
					UpdateALanguageString();
					break;
				case IDC_LANGTOKEN_FIND:
					SearchForText( LANG_NEXT );
					break;
				// Not working correctly, too hard to do... case IDC_LANGTOKEN_FINDPREV: 
				//	SearchForText( LANG_PREV );
				//	break;
				case IDC_LANGTOKEN_LANG:
					if ( HIWORD(wParam) == CBN_SELCHANGE )
						ChangeLanguageStringInComboBox();
					break;
				case IDC_LANGTOKEN_EXIT:
					ExitLanguageDialog();
					break;
				case IDC_LANGTOKEN_SAVEAS:
					char currLangName[64];
					if ( pressedReturnInEdit ) {
						pressedReturnInEdit = 0;
						return 1;
					}
					GetWindowText( GetDlgItem( hDlg, IDC_LANGTOKEN_LANG), currLangName, 64 );
					SaveLanguageToFile( currLangName );
					break;
			}
			break;

		case WM_NOTIFY:
			if ( LOWORD(wParam) == IDC_LANGTOKEN_LIST && ((LV_DISPINFO *)lParam)->hdr.code == LVN_ITEMCHANGING )
			{
				currItemSel = ((LV_DISPINFO *)lParam)->item.mask;
				DisplayCurrListItemInTextBox( currItemSel );
			}
			else if ( LOWORD(wParam) == IDC_LANGTOKEN_LIST && ((LV_DISPINFO *)lParam)->item.cchTextMax == VK_F3 )
				SearchForText( LANG_NEXT );
			break;
	}
    return 0;
}
示例#20
0
LRESULT CSitesWnd::OnUpdateToolBar(WPARAM wp, LPARAM)
{
	return UpdateToolBar (wp);
}
示例#21
0
LRESULT CUploadsWnd::OnUpdateToolBar(WPARAM wp, LPARAM)
{
	return UpdateToolBar (wp);
}
void CDlgTaxiwayConstraint::OnLvnItemchangedListData(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
    UpdateToolBar();
	*pResult = 0;
}
void CDlgItinerantTraffic::OnNewItem()
{
	ASSERT(::IsWindow(m_wndListCtrl.m_hWnd));

	ItinerantFlight* pItinerantFlight = new ItinerantFlight;
	CDlgItinerantTrafficDefine dlg(m_nProjID, m_pSelectFlightType, m_pInputAirside, m_pSelectProbDistEntry, pItinerantFlight, TRUE);
	
	if(IDOK == dlg.DoModal())
	{
		//		ItinerantFlight* pItinerantFlight = dlg.GetItinerantFlight();
		//		;
		int nIndex = m_wndListCtrl.GetItemCount();

		//
		CString strTempValue;

	//	m_wndListCtrl.InsertItinerantFlightItem(nIndex, pItinerantFlight);
		strTempValue.Format(_T("%d"),(int)(pItinerantFlight->GetEnRoute()));
		m_wndListCtrl.SetItemText(nIndex,1,strTempValue);

		int nEntryFlag = pItinerantFlight->GetEntryFlag();
		int nEntryID = pItinerantFlight->GetEntryID();
		if(nEntryFlag == ALTOBJECT_TYPE(ALT_WAYPOINT))
		{
			for (int i = 0; i < static_cast<int>(m_vWaypoint.size()); ++ i)
			{
				if(m_vWaypoint[i].getID() == nEntryID)
				{
					CString strEntry = m_vWaypoint[i].GetObjNameString();
					strTempValue.Format("%s", strEntry);
					break;
				}
			}	
		}
		else
		{
			ALTObjectGroup altObjGroup;
			altObjGroup.ReadData(nEntryID);	
			strTempValue = altObjGroup.getName().GetIDString();
		}
		m_wndListCtrl.SetEntryValue(strTempValue);


		int nExitFlag = pItinerantFlight->GetExitFlag();
		int nExitID = pItinerantFlight->GetExitID();
		if(nExitFlag == ALTOBJECT_TYPE(ALT_WAYPOINT))
		{
			for (int i = 0; i < static_cast<int>(m_vWaypoint.size()); ++ i)
			{
				if(m_vWaypoint[i].getID() == nExitID)
				{
					CString strExit = m_vWaypoint[i].GetObjNameString();
					strTempValue.Format("%s",strExit);
					break;
				}
			}
		}
		else
		{
			ALTObjectGroup altObjGroup;
			altObjGroup.ReadData(nExitID);	
			strTempValue = altObjGroup.getName().GetIDString();
		}
		m_wndListCtrl.SetExitValue(strTempValue);
		m_wndListCtrl.InsertItinerantFlightItem(nIndex,pItinerantFlight);

		//
// 		CString strTimeRange = _T(""),strDay = _T("");
// 
// 		ElapsedTime* etInsertStart = pItinerantFlight->GetArrStartTime();
// 		long lSecond = etInsertStart->asSeconds();
// 		strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 		strTimeRange = strDay + _T(" - ");
// 		ElapsedTime* etInsertEnd = pItinerantFlight->GetArrEndTime();
// 		if (*etInsertStart == 0L
// 			&& *etInsertEnd == 0L)
// 		{
// 			etInsertEnd->SetTime("23:59:59");
// 		}
// 		lSecond = etInsertEnd->asSeconds();
// 		strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 		strTimeRange += strDay;
// 		strTempValue = strTimeRange;
// 		//
// 		if (pItinerantFlight->GetEntryID() != -1)
// 		{
// 			m_wndListCtrl.SetItemText(nIndex, 4, strTempValue);
// 		}
// 
// 		etInsertStart = pItinerantFlight->GetDepStartTime();
// 		lSecond = etInsertStart->asSeconds();
// 		strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 		strTimeRange = strDay + _T(" - ");
// 		etInsertEnd = pItinerantFlight->GetDepEndTime();
// 		if (*etInsertStart == 0L
// 			&& *etInsertEnd == 0L)
// 		{
// 			etInsertEnd->SetTime("23:59:59");
// 		}
// 		lSecond = etInsertEnd->asSeconds();
// 		strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 		strTimeRange += strDay;
// 		strTempValue = strTimeRange;
// 
// 	
// 		if (pItinerantFlight->GetExitID() != -1 && !pItinerantFlight->GetEnRoute())
// 		{
// 			m_wndListCtrl.SetItemText(nIndex, 5, strTempValue);
// 		}
// 
// 
// 		strTempValue.Format("%d", pItinerantFlight->GetFltCount());
// 		m_wndListCtrl.SetItemText(nIndex, 6, strTempValue);
// 
// 		strTempValue = pItinerantFlight->GetArrDistScreenPrint();
// 		m_wndListCtrl.SetItemText(nIndex, 7, strTempValue);
// 
// 		strTempValue = pItinerantFlight->GetDepDistScreenPrint();
// 		m_wndListCtrl.SetItemText(nIndex, 8, strTempValue);

		m_pItinerantFlightList->AddNewItem(pItinerantFlight);
		
		GetDlgItem(IDC_SAVE)->EnableWindow();
		UpdateToolBar();
	}
}
示例#24
0
VOID CActionSystem::MainMenuBar_Set(INT nIndex, INT idAction)
{
	if(nIndex < 0 || nIndex > 20) return;

	if(idAction == INVALID_ID)
	{
		m_barMain[nIndex].typeItem = AOT_EMPTY;
		m_barMain[nIndex].idImpl = INVALID_ID;
		m_barMain[nIndex].idActionItem = INVALID_ID;

		UpdateToolBar();
	}
	
	CActionItem* pItem = (CActionItem*)GetAction(idAction);
	if(pItem)
	{

		switch(pItem->GetType())
		{
		case AOT_SKILL:
			{
				const SCLIENT_SKILL* pSkill = (const SCLIENT_SKILL*)pItem->GetImpl();
				if(!pSkill) break;

				m_barMain[nIndex].typeItem = AOT_SKILL;
				m_barMain[nIndex].idImpl = pSkill->m_pDefine->m_nID*100 + pSkill->m_nLevel;
				m_barMain[nIndex].idActionItem = INVALID_ID;
			}
			break;
		case AOT_ITEM:
			{
				const CObject_Item* pItemInfo = (const CObject_Item*)(const tObject_Item*)pItem->GetImpl();
				if(!pItemInfo) break;

				m_barMain[nIndex].typeItem = AOT_ITEM;
				m_barMain[nIndex].idImpl = pItemInfo->GetIdTable();
				m_barMain[nIndex].idActionItem = INVALID_ID;

			}
			break;
		case AOT_PET_SKILL:
			{
				const PET_SKILL* pPetSkill = (const PET_SKILL*)pItem->GetImpl();
				if(!pPetSkill) break;

				m_barMain[nIndex].typeItem = AOT_PET_SKILL;
				m_barMain[nIndex].idImpl = pPetSkill->m_pDefine->m_nID;
				m_barMain[nIndex].idPetIndex = pPetSkill->m_nPetNum;
				m_barMain[nIndex].idActionItem = INVALID_ID;
			}
			break;
		case AOT_CHATMOOD:
			{
				const TALK_ACT_STRUCT* pActStruct = (const TALK_ACT_STRUCT*)pItem->GetImpl();
				if(!pActStruct) break;

				m_barMain[nIndex].typeItem = AOT_CHATMOOD;
				m_barMain[nIndex].idImpl = pActStruct->m_actIdx;
				m_barMain[nIndex].idActionItem = INVALID_ID;
			}
			break;
		default:
			break;
		}

		UpdateToolBar();
	}
	ACTIONBAR_ITEM& barItem = m_barMain[nIndex];

	tActionItem* pActionItem = NULL;
	CGModifySetting msg;
	_OWN_SETTING* pSend_Value = msg.GetValue();

	switch(barItem.typeItem)
		{
		case AOT_PET_SKILL:
			pActionItem = GetAction_PetSkillID(barItem.idPetIndex,barItem.idImpl);
			msg.SetType(nIndex+SETTING_TYPE_K0);
			pSend_Value->m_SettingType = barItem.typeItem;
			pSend_Value->m_SettingData = (barItem.idPetIndex << 16) + barItem.idImpl;

			CNetManager::GetMe()->SendPacket( &msg );
			break;

		case AOT_SKILL:
			pActionItem = GetAction_SkillID(barItem.idImpl);
			msg.SetType(nIndex+SETTING_TYPE_K0);
			pSend_Value->m_SettingType = barItem.typeItem;
			pSend_Value->m_SettingData = barItem.idImpl;

			CNetManager::GetMe()->SendPacket( &msg );
			break;

		case AOT_SKILL_LIFEABILITY:
			break;

		case AOT_ITEM:
			pActionItem = GetAction_ItemIDTable_FromMyPacket(barItem.idImpl);
			if(pActionItem)
			{
				barItem.idItemCount = CDataPool::GetMe()->UserBag_CountItemByIDTable(barItem.idImpl);
			}
			else
			{
				barItem.idImpl = INVALID_ID;					
			}

			msg.SetType(nIndex+SETTING_TYPE_K0);
			pSend_Value->m_SettingType = barItem.typeItem;
			pSend_Value->m_SettingData = barItem.idImpl;

			CNetManager::GetMe()->SendPacket( &msg );
			break;

		case AOT_XINFA:
			break;

		case AOT_EMPTY:
			msg.SetType(nIndex+SETTING_TYPE_K0);
			pSend_Value->m_SettingType = barItem.typeItem;
			pSend_Value->m_SettingData = barItem.idImpl;

			CNetManager::GetMe()->SendPacket( &msg );
			break;

		default:
			break;
		}
}
void CDlgItinerantTraffic::OnEditItem()
{
	ASSERT(::IsWindow(m_wndListCtrl.m_hWnd));

	POSITION pos = m_wndListCtrl.GetFirstSelectedItemPosition();
	if (pos != NULL)
	{
		while (pos)
		{
			int nItem = m_wndListCtrl.GetNextSelectedItem(pos);
			//TODO
			ItinerantFlight* pItinerantFlight = m_pItinerantFlightList->GetItem(nItem);
			//-------------------
			CDlgItinerantTrafficDefine dlg(m_nProjID, m_pSelectFlightType, m_pInputAirside, m_pSelectProbDistEntry, pItinerantFlight);

			if(IDOK == dlg.DoModal())
			{
				SetListContent();

// 				m_wndListCtrl.SetItemText(nIndex, 0, pItinerantFlight->GetName());
// 
// 				strTempValue.Format(_T("%d"),(int)(pItinerantFlight->GetEnRoute()));
// 				m_wndListCtrl.SetItemText(nIndex,1,strTempValue);
// 
// 				int nEntryFlag = pItinerantFlight->GetEntryFlag();
// 				int nEntryID = pItinerantFlight->GetEntryID();
// 				if(nEntryFlag == ALTOBJECT_TYPE(ALT_WAYPOINT))
// 				{
// 					for (int i = 0; i < static_cast<int>(m_vWaypoint.size()); ++ i)
// 					{
// 						if(m_vWaypoint[i].getID() == nEntryID)
// 						{
// 							CString strEntry = m_vWaypoint[i].GetObjNameString();
// 							strTempValue.Format("%s",strEntry);
// 							break;
// 						}
// 					}
// 				}
// 				else
// 				{
// 					ALTObjectGroup altObjGroup;
// 					altObjGroup.ReadData(nEntryID);	
// 					strTempValue = altObjGroup.getName().GetIDString();
// 				}
// 				m_wndListCtrl.SetItemText(nIndex, 2, strTempValue);
// 
// 				int nExitFlag = pItinerantFlight->GetExitFlag();
// 				int nExitID = pItinerantFlight->GetExitID();
// 				if(nExitFlag == ALTOBJECT_TYPE(ALT_WAYPOINT))
// 				{
// 					for (int i = 0; i < static_cast<int>(m_vWaypoint.size()); ++ i)
// 					{
// 						if(m_vWaypoint[i].getID() == nExitID)
// 						{
// 							CString strExit = m_vWaypoint[i].GetObjNameString();
// 							strTempValue.Format("%s",strExit);
// 							break;
// 						}
// 					}
// 				}
// 				else
// 				{
// 					ALTObjectGroup altObjGroup;
// 					altObjGroup.ReadData(nExitID);	
// 					strTempValue = altObjGroup.getName().GetIDString();
// 				}
// 				m_wndListCtrl.SetItemText(nIndex, 3, strTempValue);
// 
// 				//
// 				CString strTimeRange = _T(""),strDay = _T("");
// 
// 				ElapsedTime* etInsertStart = pItinerantFlight->GetArrStartTime();
// 				long lSecond = etInsertStart->asSeconds();
// 				strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 				strTimeRange = strDay + _T(" - ");
// 				ElapsedTime* etInsertEnd = pItinerantFlight->GetArrEndTime();
// 				if (*etInsertStart == 0L
// 					&& *etInsertEnd == 0L)
// 				{
// 					etInsertEnd->SetTime("23:59:59");
// 				}
// 				lSecond = etInsertEnd->asSeconds();
// 				strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 				strTimeRange += strDay;
// 				strTempValue = strTimeRange;
// 				//
// 				if (pItinerantFlight->GetEntryID() != -1)
// 				{
// 					m_wndListCtrl.SetItemText(nIndex, 4, strTempValue);
// 				}
// 				else
// 				{
// 					m_wndListCtrl.SetItemText(nIndex,4,_T(""));
// 				}
// 				etInsertStart = pItinerantFlight->GetDepStartTime();
// 				lSecond = etInsertStart->asSeconds();
// 				strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 				strTimeRange = strDay + _T(" - ");
// 				etInsertEnd = pItinerantFlight->GetDepEndTime();
// 				if (*etInsertStart == 0L
// 					&& *etInsertEnd == 0L)
// 				{
// 					etInsertEnd->SetTime("23:59:59");
// 				}
// 				lSecond = etInsertEnd->asSeconds();
// 				strDay.Format(_T("Day%d %02d:%02d:%02d"),lSecond/86400+1,(lSecond % 86400)/3600,(lSecond % 86400 % 3600)/60,lSecond % 86400 % 3600 % 60);
// 				strTimeRange += strDay;
// 				strTempValue = strTimeRange;
// 				if(pItinerantFlight->GetEnRoute())
// 				{
// 					m_wndListCtrl.SetItemText(nIndex,5,_T(""));
// 				}
// 				else
// 				{
// 					if (pItinerantFlight->GetExitID() != -1)
// 					{
// 						m_wndListCtrl.SetItemText(nIndex, 5, strTempValue);
// 					}
// 					else
// 					{
// 						m_wndListCtrl.SetItemText(nIndex,5,_T(""));
// 					}
// 				}
// 				
// 				strTempValue.Format("%d", pItinerantFlight->GetFltCount());
// 				m_wndListCtrl.SetItemText(nIndex, 6, strTempValue);
// 				
// 				if (pItinerantFlight->GetEntryID() != -1)
// 				{
// 					strTempValue = pItinerantFlight->GetArrDistScreenPrint();
// 					m_wndListCtrl.SetItemText(nIndex, 7, strTempValue);
// 				}
// 				else
// 				{
// 					m_wndListCtrl.SetItemText(nIndex,7,_T(""));
// 				}
// 
// 				if (pItinerantFlight->GetExitID() != -1)
// 				{
// 					strTempValue = pItinerantFlight->GetDepDistScreenPrint();
// 					m_wndListCtrl.SetItemText(nIndex,8,strTempValue);
// 				}
// 				else
// 				{
// 					m_wndListCtrl.SetItemText(nIndex,8,_T(""));
// 				}
 			}
 			//-------------------
 		}

	}

	GetDlgItem(IDC_SAVE)->EnableWindow();
	UpdateToolBar();
}
void CDlgItinerantTraffic::OnLvnItemchangedListContents(NMHDR *pNMHDR, LRESULT *pResult)
{
	LPNMLISTVIEW pNMLV = reinterpret_cast<LPNMLISTVIEW>(pNMHDR);
	UpdateToolBar();
	*pResult = 0;
}
示例#27
0
V4StudioFrame::V4StudioFrame():
    wxFrame((wxFrame *) NULL, -1, "V4Studio", wxPoint(50, 50), wxSize(800, 700))
{

	m_pV4sm = NULL;

	m_selection = NULL;
	m_parentSelection = NULL;
	m_clipboardNode = NULL;

	m_frame = 0; // we start at frame=0
	editDict = false;

	// Creates components and places them on the form
	fieldView = new V4FieldList(this, wxSize(100,250));
	treeView = new V4StudioTree(this, wxSize(100,250), fieldView);
	timeLine = new V4TimeLine(this);
	timeLine->SetSize(500, 100);
	cmdPanel = new V4CommandPanel(this);
	cmdPanel->SetSize(100, 100);

	/*new m_pFileMenu bar*/
	wxMenuBar *b = new wxMenuBar();
	/*file*/
	m_pFileMenu = new wxMenu();
	m_pFileMenu->Append(MENU_FILE_NEW, "&New\tCtrl+N", "Create a new document");
	m_pFileMenu->Append(MENU_FILE_OPEN, "&Open...\tCtrl+O", "Open an existing document");
	m_pFileMenu->Append(MENU_FILE_SAVE, "&Save\tCtrl+S", "Save the active document");
	m_pFileMenu->Append(MENU_FILE_CLOSE, "&Close\tCtrl+X", "Close the active document");
	m_pFileMenu->AppendSeparator();
	m_pFileMenu->Append(CHANGE_SIZE_DIALOG, "&Size\tCtrl+Z", "Change scene size");
	m_pFileMenu->Append(CHANGE_FRAMERATE, "&FrameRate\tCtrl+F", "Change FrameRate");
	m_pFileMenu->Append(CHANGE_LENGTH, "&Length\tCtrl+L", "Change Length");
	m_pFileMenu->AppendSeparator();
	m_pFileMenu->Append(MENU_FILE_QUIT, "E&xit", "Quit the application; prompts to save documents");
	b->Append(m_pFileMenu, "&File");
	SetMenuBar(b);

	/*file*/
	m_pToolsMenu = new wxMenu();
	m_pToolsMenu->Append(MENU_TOOL_SHOW_LOWLEVEL, "&Low-Level\tCtrl+L", "Shows the low-level toolbar");
	m_pToolsMenu->Append(MENU_TOOL_SHOW_HIGHLEVEL, "&High-Level\tCtrl+H", "Shows the high-level toolbar");
	b->Append(m_pToolsMenu, "&Tools");
	SetMenuBar(b);

	m_pStatusbar = CreateStatusBar();

	// Main Toolbar
	m_pMainToolbar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL|wxTB_FLAT);
	m_pMainToolbar->AddTool(TOOL_FILE_NEW, _("New"), wxBitmap (wxT("rc\\new.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Open a new file"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_FILE_OPEN, _("Open"), wxBitmap (wxT("rc\\open.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Open an existing file (BT/XMT/MP4)"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_FILE_SAVE, _("Save"), wxBitmap (wxT("rc\\save.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Save to a file"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_FILE_CLOSE, _("Close"), wxBitmap (wxT("rc\\close.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Close the file"), wxT(""));
	m_pMainToolbar->AddSeparator();
	m_pMainToolbar->AddTool(TOOL_FILE_PREVIEW, _("Preview"), wxBitmap (wxT("rc\\preview.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Preview in player"), wxT(""));
	m_pMainToolbar->AddSeparator();
	m_pMainToolbar->AddTool(TOOL_EDIT_CUT, _("Cut"), wxBitmap (wxT("rc\\cut.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Cut"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_EDIT_COPY, _("Copy"), wxBitmap (wxT("rc\\copy.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Copy"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_EDIT_PASTE, _("Paste"), wxBitmap (wxT("rc\\paste.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Paste"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_EDIT_PASTE_USE, _("PastePlus"), wxBitmap (wxT("rc\\paste_use.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Paste a USE"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_EDIT_DELETE, _("Delete"), wxBitmap (wxT("rc\\delete.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Delete"), wxT(""));
	m_pMainToolbar->AddSeparator();
	m_pMainToolbar->AddTool(TOOL_EDIT_UNDO, _("Undo"), wxBitmap (wxT("rc\\undo.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Undo"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_EDIT_REDO, _("Redo"), wxBitmap (wxT("rc\\redo.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Redo"), wxT(""));
	m_pMainToolbar->AddSeparator();

	m_pMainToolbar->AddSeparator();

	m_pMainToolbar->AddTool(TOOL_ADD_TO_TL, _("AddToTL"), wxBitmap( wxT("rc\\paste.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Add to timeLine"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_NEXT_FRAME, _("NextFrame"), wxBitmap( wxT("rc\\redo.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Next frame"), wxT(""));
	m_pMainToolbar->AddTool(TOOL_VIEW_DICT, _("ViewDict"), wxBitmap( wxT("rc\\open.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("View Dictionnary"), wxT(""));

	/* Not Implemented yet */
	m_pMainToolbar->EnableTool(TOOL_FILE_PREVIEW, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_UNDO, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_REDO, false);
	m_pMainToolbar->EnableTool(TOOL_NEXT_FRAME, false);

	/* Not available when starting V4Studio */
	/* Nothing to save */
	m_pFileMenu->Enable(MENU_FILE_SAVE, false);
	m_pFileMenu->Enable(MENU_FILE_CLOSE, false);
	m_pFileMenu->Enable(CHANGE_SIZE_DIALOG, false);
	m_pFileMenu->Enable(CHANGE_LENGTH, false);
	m_pFileMenu->Enable(CHANGE_FRAMERATE, false);
	m_pMainToolbar->EnableTool(TOOL_FILE_SAVE, false);
	m_pMainToolbar->EnableTool(TOOL_FILE_CLOSE, false);

	/* Nothing to edit */
	m_pMainToolbar->EnableTool(TOOL_EDIT_CUT, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_COPY, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_PASTE, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_PASTE_USE, false);
	m_pMainToolbar->EnableTool(TOOL_EDIT_DELETE, false);

	m_pMainToolbar->EnableTool(TOOL_ADD_TO_TL, false);
	m_pMainToolbar->EnableTool(TOOL_VIEW_DICT, false);
	m_pMainToolbar->Realize();
	SetToolBar(m_pMainToolbar);

	m_uSelectedNodeToolBar = 0;
	// Node Creation Toolbar
	m_pLowLevelNodeToolbar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_VERTICAL|wxTB_FLAT);
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_ORDEREDGROUP, _("OrderedGroup"), wxBitmap (wxT("rc\\orderedgroup.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create an OrderedGroup"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_LAYER2D, _("Layer2D"), wxBitmap (wxT("rc\\layer2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Layer2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_TRANSFORM2D, _("Transform2D"), wxBitmap (wxT("rc\\t2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Tranform2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_TRANSFORMMATRIX2D, _("TransformMatrix2D"), wxBitmap (wxT("rc\\tm2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a TranformMatrix2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_COLOR_TRANSFORM, _("ColorTransform"), wxBitmap (wxT("rc\\colortransform.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a ColorTransform"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_SHAPE, _("Shape"), wxBitmap (wxT("rc\\shape.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Shape"), wxT(""));
	m_pLowLevelNodeToolbar->AddSeparator();
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_APPEARANCE, _("Appearance"), wxBitmap (wxT("rc\\appearance.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create an Appearance"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_MATERIAL2D, _("Material2D"), wxBitmap (wxT("rc\\material2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Material2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_LINEPROPS, _("LineProps"), wxBitmap (wxT("rc\\lineproperties.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a LineProperties"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_LINEAR_GRADIENT, _("LinearGradient"), wxBitmap (wxT("rc\\lg.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Linear Gradient"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_RADIAL_GRADIENT, _("RadialGradient"), wxBitmap (wxT("rc\\rg.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Radial Gradient"), wxT(""));
	m_pLowLevelNodeToolbar->AddSeparator();
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_RECT, _("Rectangle"), wxBitmap (wxT("rc\\rect.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Rectangle"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_CIRCLE, _("Circle"), wxBitmap (wxT("rc\\circle.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Rectangle"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_IFS2D, _("IndexedFaceSet2D"), wxBitmap (wxT("rc\\ifs2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create an IndexedFaceSet2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_ILS2D, _("IndexedLineSet2D"), wxBitmap (wxT("rc\\ils2d.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create an IndexedLineSet2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_XLINEPROPS, _("XLineProps"), wxBitmap (wxT("rc\\xlineproperties.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create an XLineProperties"), wxT(""));
	m_pLowLevelNodeToolbar->AddSeparator();
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_TEXT, _("Text"), wxBitmap (wxT("rc\\text.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a Text"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_FONTSTYLE, _("FontStyle"), wxBitmap (wxT("rc\\fs.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Create a FontStyle"), wxT(""));
	m_pLowLevelNodeToolbar->AddSeparator();
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_BACKGROUND2D, _("Background2D"), wxBitmap (wxT("rc\\image.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Add a Background2D"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_MOVIE, _("Movie"), wxBitmap (wxT("rc\\movie.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Add a Movie"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_IMAGE, _("Image"), wxBitmap (wxT("rc\\image.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Add an Image"), wxT(""));
	m_pLowLevelNodeToolbar->AddTool(TOOL_NEW_SOUND, _("Sound"), wxBitmap (wxT("rc\\sound.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Add a Sound"), wxT(""));
	m_pLowLevelNodeToolbar->Realize();

/*
	m_pHighLevelNodeToolbar = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_VERTICAL|wxTB_FLAT);
	m_pHighLevelNodeToolbar->AddTool(TOOL_NEW_2DSCENE, _("OrderedGroup"), wxBitmap (wxT("rc\\orderedgroup.bmp"), wxBITMAP_TYPE_ANY), wxNullBitmap, wxITEM_NORMAL, _("Creates a 2D scene"), wxT(""));
	m_pHighLevelNodeToolbar->Realize();
*/
	set_properties();
	do_layout();
	UpdateToolBar();
}