示例#1
0
void CToolBar::UpdateToolbarState()
{
	CState* pState = CContextManager::Get()->GetCurrentContext();
	if (!pState) {
		return;
	}

	const CServer* pServer = pState->GetServer();
	const bool idle = pState->IsRemoteIdle();

	EnableTool(XRCID("ID_TOOLBAR_DISCONNECT"), pServer && idle);
	EnableTool(XRCID("ID_TOOLBAR_CANCEL"), pServer && !idle);
	EnableTool(XRCID("ID_TOOLBAR_SYNCHRONIZED_BROWSING"), pServer != 0);

	ToggleTool(XRCID("ID_TOOLBAR_COMPARISON"), pState->GetComparisonManager()->IsComparing());
	ToggleTool(XRCID("ID_TOOLBAR_SYNCHRONIZED_BROWSING"), pState->GetSyncBrowse());

	bool canReconnect;
	if (pServer || !idle) {
		canReconnect = false;
	}
	else {
		canReconnect = static_cast<bool>(pState->GetLastSite().m_server);
	}
	EnableTool(XRCID("ID_TOOLBAR_RECONNECT"), canReconnect);
}
示例#2
0
void wxRibbonToolBar::UpdateWindowUI(long flags)
{
    wxWindowBase::UpdateWindowUI(flags);

    // don't waste time updating state of tools in a hidden toolbar
    if ( !IsShown() )
        return;

    size_t group_count = m_groups.GetCount();
    size_t g, t;
    for(g = 0; g < group_count; ++g)
    {
        wxRibbonToolBarToolGroup* group = m_groups.Item(g);
        size_t tool_count = group->tools.GetCount();
        for(t = 0; t < tool_count; ++t)
        {
            wxRibbonToolBarToolBase* tool = group->tools.Item(t);
            int id = tool->id;

            wxUpdateUIEvent event(id);
            event.SetEventObject(this);

            if ( ProcessWindowEvent(event) )
            {
                if ( event.GetSetEnabled() )
                    EnableTool(id, event.GetEnabled());
                if ( event.GetSetChecked() )
                    ToggleTool(id, event.GetChecked());
            }
        }
    }
}
示例#3
0
DrawToolBar::DrawToolBar(wxWindow *parent) :
	wxToolBar(parent,-1)
{
	SetHelpText(_T("draw3-toolbar-items"));

	AddTool(drawTB_ABOUT, _T(""),help_xpm,_("About"));
	AddTool(drawTB_FIND, _T(""),find_xpm, _("Find"));
	AddTool(drawTB_SUMWIN, _T(""),plus_xpm, _("Summary Window"));
	AddTool(drawTB_SPLTCRS, _T(""),split_xpm, _("Split cursor"), wxITEM_CHECK);
	AddTool(drawTB_FILTER, _T(""),filter0_xpm, _("Filter"));
	AddTool(drawTB_REFRESH, _T(""),refresh_xpm, _("Refresh"));
	AddTool(drawTB_DRAWTREE, _T(""),draw_tree_xpm, _("Tree Set"));
/** disable florence keyboard in windows builds */
#ifndef MINGW32
	AddTool(drawTB_FLORENCE, _T(""), florence_xpm, _("Show screen keyboard"));
#endif
	AddTool(drawTB_GOTOLATESTDATE, _T(""), flag_checkered_xpm, _("Go to latest date"));
	AddTool(drawTB_REMARK, _T(""), remark_xpm, _("Remarks"));
	AddTool(drawTB_EXIT, _T(""),exit_xpm, _("Quit"));
	if (VersionChecker::IsNewVersion())
		NewDrawVersionAvailable();
	else
		Realize();

#ifndef MINGW32
	/* disable florence button if program is not present */
	std::string path = exec_cmd("which florence");
	path = path.substr(0, path.size()-1);

	if (access(path.c_str(), X_OK))
		EnableTool(drawTB_FLORENCE, false);
#endif

	VersionChecker::AddToolbar(this);
}
示例#4
0
void MagnifyTool::InitApp( CDXUTDialogResourceManager* pResourceManager )
{
    D3DCOLOR DlgColor = 0x88888888;

    m_MagnifyUI.Init( pResourceManager );

    int iY = 0;

    m_MagnifyUI.SetBackgroundColors( DlgColor );
    m_MagnifyUI.EnableCaption( true );
    m_MagnifyUI.SetCaptionText( L"-- Magnify Tool --" );

    m_MagnifyUI.AddCheckBox( IDC_MAGNIFY_CHECKBOX_ENABLE, L"Magnify: RMouse", 5, iY, 140, 24, true );

    m_MagnifyUI.AddStatic( IDC_MAGNIFY_STATIC_PIXEL_REGION, L"Pixel Region : 128", 5, iY += 25, 90, 24 );
    m_MagnifyUI.AddSlider( IDC_MAGNIFY_SLIDER_PIXEL_REGION, 15, iY += 25, 140, 24, 16, 256, 128, false );

    m_MagnifyUI.AddStatic( IDC_MAGNIFY_STATIC_SCALE, L"Scale : 5", 5, iY += 25, 50, 24 );
    m_MagnifyUI.AddSlider( IDC_MAGNIFY_SLIDER_SCALE, 15, iY += 25, 140, 24, 2, 10, 5, false );

    m_MagnifyUI.AddCheckBox( IDC_MAGNIFY_CHECKBOX_DEPTH, L"View Depth", 5, iY += 25, 140, 24, false );

    m_MagnifyUI.AddStatic( IDC_MAGNIFY_STATIC_DEPTH_MIN, L"Depth Min : 0.0f", 5, iY += 25, 90, 24 );
    m_MagnifyUI.AddSlider( IDC_MAGNIFY_SLIDER_DEPTH_MIN, 15, iY += 25, 140, 24, 0, 100, 0, false );

    m_MagnifyUI.AddStatic( IDC_MAGNIFY_STATIC_DEPTH_MAX, L"Depth Max : 1.0f", 5, iY += 25, 90, 24 );
    m_MagnifyUI.AddSlider( IDC_MAGNIFY_SLIDER_DEPTH_MAX, 15, iY += 25, 140, 24, 0, 100, 100, false );

    m_MagnifyUI.AddCheckBox( IDC_MAGNIFY_CHECKBOX_SUB_SAMPLES, L"Subsamples: MWheel", 5, iY += 25, 140, 24, false );

    EnableTool();
    EnableUI();
}
示例#5
0
文件: HRpos_f.cpp 项目: jumandan/cafe
HRPosToolBar::HRPosToolBar(wxWindow *parent)
: wxToolBar(parent, wxID_ANY, wxPoint(20,20)/*DefaultPosition*/,
	wxSize(parent->GetSize().GetWidth(), 30), wxBORDER_NONE|wxTB_HORIZONTAL|wxTB_NODIVIDER|wxTB_FLAT|wxTB_TEXT|wxTAB_TRAVERSAL )
{
  try
  {
	SetToolBitmapSize(wxSize(30, 30));
	AddTool(1, local->get("HR_f", "add_pos", "Add"), HR_tool(2));  //BITMAP_TYPE_BMP
	AddTool(3, local->get("HR_f", "edit_pos", "Edit"), HR_tool(1));  //BITMAP_TYPE_BMP
	AddTool(2, local->get("HR_f", "del_pos", "Delete"), HR_tool(0));

	AddSeparator();
	
	if (!(users->user().administrator())) 
	{
		EnableTool(1, false);
		EnableTool(2, false);
		EnableTool(3, false);
	}

	if (!positionrole->loaded()) positionrole->load_positionrole();
	wxString pposition [1000];
	for ( int i=0; i< positionrole->size(); i++) pposition[i] = to_uc(positionrole->get_name(i));
	lb_position = new HRListBox(parent, positionrole->size(), pposition);
	wxCommandEvent evt = wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED, 0);  
	lb_position->OnClickPos(evt);
	lb_position->Select(0);
	pos = 0;

	Realize();
  }
  catch(exception_t &e)
  {
	wxMessageBox(to_uc(e.message()));
  }
  catch(std::exception &e)
  {
	wxMessageBox(to_uc(e.what()));
  }
  catch(...)
  {
	exception_t e(5022, "unexpected error", "HRPosToolBar::HRPosToolBar");
	wxMessageBox(to_uc(e.message()));
  }
}
void AGameplayDebuggingReplicator::OnRep_AutoActivate()
{
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
	// we are already replicated so let's activate tool
	if (GetWorld() && GetNetMode() == ENetMode::NM_Client && !IsToolCreated() && !IsGlobalInWorld())
	{
		CreateTool();
		EnableTool();
	}
#endif
}
示例#7
0
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::UpdateWindowUI(long flags)
{
    wxWindowBase::UpdateWindowUI(flags);

    // don't waste time updating state of tools in a hidden toolbar
    if ( !IsShown() )
        return;

    wxEvtHandler* evtHandler = GetEventHandler() ;

#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
          node;
          node = node->GetNext() )
    {
        wxToolBarToolBase * const tool = node->GetData();
        if ( tool->IsSeparator() )
            continue;

        int toolid = tool->GetId();

        wxUpdateUIEvent event(toolid);
        event.SetEventObject(this);

        if ( evtHandler->ProcessEvent(event) )
        {
            if ( event.GetSetEnabled() )
                EnableTool(toolid, event.GetEnabled());
            if ( event.GetSetChecked() )
                ToggleTool(toolid, event.GetChecked());
#if 0
            if ( event.GetSetText() )
                // Set tooltip?
#endif // 0
        }
    }
}
示例#8
0
void ToolBar::updateToolBar( MainFrame *mf )
{
    ToggleTool( m_toggleShowAxial->GetId(),     SceneManager::getInstance()->isAxialDisplayed() );
    ToggleTool( m_toggleShowCoronal->GetId(),   SceneManager::getInstance()->isCoronalDisplayed() );
    ToggleTool( m_toggleShowSagittal->GetId(),  SceneManager::getInstance()->isSagittalDisplayed() );
    ToggleTool( m_toggleAlphaBlending->GetId(), SceneManager::getInstance()->isAlphaBlend() );
    ToggleTool( m_toggleLighting->GetId(),      SceneManager::getInstance()->isLightingActive() );
    ToggleTool( m_toggleShowAllSelectionObjects->GetId(), SceneManager::getInstance()->getShowAllSelObj() );
    ToggleTool( m_toggleActivateAllSelectionObjects->GetId(), !SceneManager::getInstance()->getActivateAllSelObj() );

    bool isFiberSelected = false;
    bool isFiberUsingFakeTubes = false;
    bool isFiberInverted = false;
    if (mf->m_pCurrentSceneObject != NULL && mf->m_currentListIndex != -1)
    {
        DatasetInfo* pDatasetInfo = ((DatasetInfo*)mf->m_pCurrentSceneObject);

        if( pDatasetInfo->getType() == FIBERS || pDatasetInfo->getType() == FIBERSGROUP )
        {
            isFiberSelected = true;
            Fibers* pFibers = (Fibers*)pDatasetInfo;
            if( pFibers )
            {
                isFiberUsingFakeTubes = pFibers->isUsingFakeTubes();
                isFiberInverted = pFibers->isFibersInverted();
            }
        }
    }
    ToggleTool( m_toggleFakeTubes->GetId(), isFiberSelected && isFiberUsingFakeTubes);
    ToggleTool( m_toggleInverseSelection->GetId(), isFiberSelected && isFiberInverted);
    ToggleTool( m_toggleClearToBlack->GetId(), SceneManager::getInstance()->getClearToBlack() );
    ToggleTool( m_selectNormalPointer->GetId(), SceneManager::getInstance()->isRulerActive() && mf->isDrawerToolActive() );
    ToggleTool( m_selectRuler->GetId(), SceneManager::getInstance()->isRulerActive() );
    ToggleTool( m_selectDrawer->GetId(), mf->isDrawerToolActive() );
    //SetToolNormalBitmap(m_selectColorPicker->GetId(), wxBitmap(mf->m_pDatasetHelper->m_drawColorIcon));

    ToggleTool( m_toggleDrawRound->GetId(), mf->canDrawRound() );
    ToggleTool( m_toggleDraw3d->GetId(), mf->canDraw3D() );
    ToggleTool( m_selectPen->GetId(), DRAWMODE_PEN == mf->getDrawMode() );
    ToggleTool( m_selectEraser->GetId(), DRAWMODE_ERASER == mf->getDrawMode() );
    
    // Check if the currently selected anatomy can use the Color Picker.
    EnableTool( m_selectColorPicker->GetId(), DRAWMODE_PEN == mf->getDrawMode() && mf->canUseColorPicker() );
}
示例#9
0
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::UpdateWindowUI(long flags)
{
    wxWindowBase::UpdateWindowUI(flags);

    // don't waste time updating state of tools in a hidden toolbar
    if ( !IsShown() )
        return;

    // There is no sense in updating the toolbar UI
    // if the parent window is about to get destroyed
    wxWindow *tlw = wxGetTopLevelParent( this );
    if (tlw && wxPendingDelete.Member( tlw ))
        return;

    wxEvtHandler* evtHandler = GetEventHandler() ;

    for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
          node;
          node = node->GetNext() )
    {
        wxToolBarToolBase * const tool = node->GetData();
        if ( tool->IsSeparator() )
            continue;

        int id = tool->GetId();

        wxUpdateUIEvent event(id);
        event.SetEventObject(this);

        if ( evtHandler->ProcessEvent(event) )
        {
            if ( event.GetSetEnabled() )
                EnableTool(id, event.GetEnabled());
            if ( event.GetSetChecked() )
                ToggleTool(id, event.GetChecked());
#if 0
            if ( event.GetSetText() )
                // Set tooltip?
#endif // 0
        }
    }
}
示例#10
0
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::UpdateWindowUI(long flags)
{
    wxWindowBase::UpdateWindowUI(flags);

    // don't waste time updating state of tools in a hidden toolbar
    if ( !IsShown() )
        return;

    wxEvtHandler* evtHandler = GetEventHandler() ;

    for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
          node;
          node = node->GetNext() )
    {
        wxToolBarToolBase * const tool = node->GetData();
        if ( tool->IsSeparator() )
            continue;

        int toolid = tool->GetId();

        wxUpdateUIEvent event(toolid);
        event.SetEventObject(this);

        if ( evtHandler->ProcessEvent(event) )
        {
            if ( event.GetSetEnabled() )
                EnableTool(toolid, event.GetEnabled());
            if ( event.GetSetChecked() )
                ToggleTool(toolid, event.GetChecked());
#if 0
            if ( event.GetSetText() )
                // Set tooltip?
#endif // 0
        }
    }
}
示例#11
0
void MagnifyTool::OnResizedSwapChain( ID3D10Device* pd3dDevice, IDXGISwapChain *pSwapChain, 
                                        const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext, 
                                        int nPositionX, int nPositionY )
{
    CreateDepthStencil( pd3dDevice, pSwapChain, pBackBufferSurfaceDesc, pUserContext );

    m_MagnifyUI.SetLocation( nPositionX, nPositionY );
    m_MagnifyUI.SetSize( 170, 155 );

    m_Magnify.OnResizedSwapChain( DXUTGetDXGIBackBufferSurfaceDesc() );

    if( m_bReleaseRTOnResize )
    {
        D3D10_RENDER_TARGET_VIEW_DESC RTDesc;
        DXUTGetD3D10RenderTargetView()->GetResource( &m_pSourceRTResource );
        DXUTGetD3D10RenderTargetView()->GetDesc( &RTDesc );
        m_RTFormat = RTDesc.Format;
        m_nWidth = DXUTGetDXGIBackBufferSurfaceDesc()->Width;
        m_nHeight = DXUTGetDXGIBackBufferSurfaceDesc()->Height;
        m_nSamples = DXUTGetDXGIBackBufferSurfaceDesc()->SampleDesc.Count;

        if( !m_MagnifyUI.GetCheckBox( IDC_MAGNIFY_CHECKBOX_DEPTH )->GetChecked() )
        {
            m_Magnify.SetSourceResource( m_pSourceRTResource, m_RTFormat, m_nWidth, m_nHeight, m_nSamples );
        }
    }

    if( m_bReleaseDepthOnResize )
    {
        D3D10_DEPTH_STENCIL_VIEW_DESC DSDesc;
        m_pDSV->GetResource( &m_pSourceDepthResource );
        m_pDSV->GetDesc( &DSDesc );
        m_DepthFormat = DSDesc.Format;
        m_nWidth = DXUTGetDXGIBackBufferSurfaceDesc()->Width;
        m_nHeight = DXUTGetDXGIBackBufferSurfaceDesc()->Height;
        m_nSamples = DXUTGetDXGIBackBufferSurfaceDesc()->SampleDesc.Count;

        if( m_MagnifyUI.GetCheckBox( IDC_MAGNIFY_CHECKBOX_DEPTH )->GetChecked() )
        {
            m_Magnify.SetSourceResource( m_pSourceDepthResource, m_DepthFormat, m_nWidth, m_nHeight, m_nSamples );
        }
    }

    EnableTool();

    if( m_nSamples > 1 )
    {
        EnableSubSampleUI();
    }
    else
    {
        DisableSubSampleUI();
    }

    ID3D10Device1* pd3dDevice1 = DXUTGetD3D10Device1();
    if( ( NULL == pd3dDevice1 ) && ( m_nSamples > 1 ) )
    {
        DisableDepthUI();

        if( NULL == m_pSourceRTResource )
        {
            DisableUI();
            DisableTool();
        }
        else
        {
            m_Magnify.SetSourceResource( m_pSourceRTResource, m_RTFormat, m_nWidth, m_nHeight, m_nSamples );
        }
    }
    else
    {
        if( NULL != m_pSourceDepthResource )
        {
            EnableDepthUI();
        }
    }
}
示例#12
0
ToolBar::ToolBar(wxWindow *parent)
    :wxToolBar( parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL | wxNO_BORDER )    
{
    wxImage bmpOpen(MyApp::iconsPath+ wxT("fileopen.png" ), wxBITMAP_TYPE_PNG);

    m_btnOpen = this->AddTool(wxID_ANY, bmpOpen, wxT("Open"));    
    this->AddSeparator();

    wxImage bmpAxial(MyApp::iconsPath+ wxT("axial.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpCor(MyApp::iconsPath+ wxT("cor.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpSag(MyApp::iconsPath+ wxT("sag.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpAlphaBlend(MyApp::iconsPath+ wxT("alphablend.png"), wxBITMAP_TYPE_PNG);

    m_toggleShowAxial = this->AddCheckTool( wxID_ANY, wxT("Show Axial"), bmpAxial, wxNullBitmap, wxT("Show Axial"));
    m_toggleShowCoronal = this->AddCheckTool( wxID_ANY, wxT( "Show Coronal" ), bmpCor, wxNullBitmap, wxT("Show Coronal"));
    m_toggleShowSagittal = this->AddCheckTool( wxID_ANY, wxT("Show Sagittal"), bmpSag, wxNullBitmap, wxT("Show Sagittal"));
    m_toggleAlphaBlending = this->AddCheckTool( wxID_ANY, wxT("Toggle Alpha Blending"), bmpAlphaBlend, wxNullBitmap, wxT("Toggle Alpha Blending"));
    this->AddSeparator();

    wxImage bmpBox(MyApp::iconsPath+ wxT("box.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpBoxEyeAll(MyApp::iconsPath+ wxT("box_eye_all.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpBoxOffAll(MyApp::iconsPath+ wxT("box_off_all.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpBoxNotAll(MyApp::iconsPath+ wxT("box_not_all.png"), wxBITMAP_TYPE_PNG);

    m_btnNewSelectionBox = this->AddTool( wxID_ANY, bmpBox, wxT("New Selection Box"));
    m_toggleShowAllSelectionObjects = this->AddCheckTool( wxID_ANY, wxT( "Toggle Show All Selection Object" ), bmpBoxEyeAll, wxNullBitmap, wxT("Toggle Show All Selection Objects"));
    m_toggleActivateAllSelectionObjects = this->AddCheckTool( wxID_ANY, wxT( "Toggle Activate All Selection Objects" ), bmpBoxOffAll, wxNullBitmap, wxT("Toggle Activate All Selection Objects"));
    m_toggleInverseSelection = this->AddCheckTool( wxID_ANY, wxT( "Toggle Inverse Fibers Selection" ), bmpBoxNotAll, wxNullBitmap, wxT("Toggle Inverse Fibers Selection"));
    this->AddSeparator();

    wxImage bmpGridSpline(MyApp::iconsPath+ wxT("grid_spline.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpGrid(MyApp::iconsPath+ wxT("grid.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpView1(MyApp::iconsPath+ wxT("view1.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpView3(MyApp::iconsPath+ wxT("view3.png"), wxBITMAP_TYPE_PNG);

    wxImage bmpLighting(MyApp::iconsPath+ wxT("lightbulb.png"), wxBITMAP_TYPE_PNG);

    m_toggleLighting = this->AddCheckTool( wxID_ANY, wxT( "Toggle Lighting" ), bmpLighting, wxNullBitmap, wxT("Toggle Lighting"));
    this->AddSeparator();

    wxImage bmpTubes (MyApp::iconsPath+ wxT("tubes.png"), wxBITMAP_TYPE_PNG);

    m_toggleFakeTubes = this->AddCheckTool( wxID_ANY, wxT("Toggle Tubes"), bmpTubes, wxNullBitmap, wxT("Toggle Tubes"));
    this->AddSeparator();

    wxImage bmpClearColor (MyApp::iconsPath+ wxT("background_color.png"), wxBITMAP_TYPE_PNG);

    m_toggleClearToBlack = this->AddCheckTool( wxID_ANY, wxT("Clear To Black"), bmpClearColor, wxNullBitmap, wxT("Clear To Black"));
    this->AddSeparator();

    wxImage bmpPointer (MyApp::iconsPath+ wxT("pointer.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpRuler (MyApp::iconsPath+ wxT("rulertool.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpDrawer (MyApp::iconsPath+ wxT("drawertool.png"), wxBITMAP_TYPE_PNG);

    m_selectNormalPointer = this->AddRadioTool( wxID_ANY, wxT("Pointer" ), bmpPointer, wxNullBitmap, wxT("Pointer"));
    m_selectRuler = this->AddRadioTool( wxID_ANY, wxT("Ruler" ), bmpRuler, wxNullBitmap, wxT("Ruler"));
    m_selectDrawer = this->AddRadioTool( wxID_ANY, wxT("Drawer" ), bmpDrawer, wxNullBitmap, wxT("Drawer"));
    this->AddSeparator();

    m_txtRuler = new wxTextCtrl(this, wxID_ANY,wxT("0.00mm (0.00mm)"), wxDefaultPosition, wxSize( 160, 24 ), wxTE_LEFT | wxTE_READONLY);
    m_txtRuler->SetForegroundColour(wxColour(wxT("#222222")));
    m_txtRuler->SetBackgroundColour(*wxWHITE);
    wxFont font = m_txtRuler->GetFont();
    font.SetPointSize(10);
    font.SetWeight(wxBOLD);
    m_txtRuler->SetFont(font);
    this->AddControl(m_txtRuler);

    //no wxImage, it will show the selected color

    m_selectColorPicker = this->AddTool(wxID_ANY, wxT("Color Picker" ), bmpClearColor, wxNullBitmap, wxITEM_NORMAL, wxT("Color Picker"));
    EnableTool(m_selectColorPicker->GetId(), false);

    wxImage bmpRound (MyApp::iconsPath+ wxT("draw_round.png"), wxBITMAP_TYPE_PNG);
    wxImage bmp3d (MyApp::iconsPath+ wxT("draw3D.png"), wxBITMAP_TYPE_PNG);

    m_toggleDrawRound = this->AddCheckTool( wxID_ANY, wxT( "Round Shape" ), bmpRound, wxNullBitmap, wxT("Round Shape"));
    EnableTool(m_toggleDrawRound->GetId(), false);
    m_toggleDraw3d = this->AddCheckTool( wxID_ANY, wxT( "Draw in 3d" ), bmp3d, wxNullBitmap, wxT("Draw in 3d"));
    EnableTool(m_toggleDraw3d->GetId(), false);
    this->AddSeparator();

    wxImage bmpPen (MyApp::iconsPath+ wxT("draw_pen.png"), wxBITMAP_TYPE_PNG);
    wxImage bmpEraser (MyApp::iconsPath+ wxT("draw_eraser.png"), wxBITMAP_TYPE_PNG);

    m_selectPen = this->AddRadioTool( wxID_ANY, wxT("Use Pen" ), bmpPen, wxNullBitmap, wxT("Use Pen"));
    EnableTool(m_selectPen->GetId(), false);
    m_selectEraser = this->AddRadioTool( wxID_ANY, wxT("Use Eraser" ), bmpEraser, wxNullBitmap, wxT("Use Eraser"));
    EnableTool(m_selectEraser->GetId(), false);
}