NCBI C++ ToolKit
commands.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: commands.cpp 39528 2017-10-05 15:27:37Z katargir $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Authors: Andrey Yazhuk
27  *
28  * File Description:
29  *
30  */
31 
32 #include <ncbi_pch.hpp>
33 
34 #include <gui/core/commands.hpp>
35 
38 
40 
41 
43 {
44  /*cmd_reg.RegisterCommand(, "", "", "", "");
45  */
46 
47  // View commands
48  cmd_reg.RegisterCommand(
49  eCmdBroadcastSel, "&Broadcast Selection", "Broadcast Selection",
50  "menu::broadcast", "Broadcast selection from the active view"
51  );
52 
53  cmd_reg.RegisterCommand(
54  eCmdBroadcastSelRange, "&Broadcast Ranges", "Broadcast Ranges",
55  "menu::broadcast_range", "Broadcast selection as ranges from the active view"
56  );
57 
58 
59  cmd_reg.RegisterCommand(
60  eCmdOpenView, "Open &New View...\tCtrl+N", "Open New View...",
61  "", "Show a dialog with a list of available Views"
62  );
63 
64  cmd_reg.RegisterCommand(
65  eCmdOpenViewDefault, "Open &Default View",
66  "", "Open default view if exists or show a dialog with a list of available Views"
67  );
68 
69  // Workspace commands
70  cmd_reg.RegisterCommand(eCmdCloseWorkspace, "&Close All Projects", "Close All Projects", "", "");
71  cmd_reg.RegisterCommand(eCmdShowHideDisabledItems, "Show / Hide", "Show / Hide",
72  "", "Show / Hide Disabled Project Items");
73 
74  // Project commands
75  cmd_reg.RegisterCommand(eCmdAddNewProject, "New Project...", "New Project...",
76  "", "Creates a new empty Project in the current Workspace");
77  cmd_reg.RegisterCommand(eCmdLoadProject, "&Load Project", "Load Project",
78  "", "Loads Projects that currently are not loaded");
79  cmd_reg.RegisterCommand(eCmdUnLoadProject, "&Unload Project", "",
80  "", "Unload Projects that are currently loaded");
81  //cmd_reg.RegisterCommand(eCmdAddExistingProject, "&", "", "", "");
82  cmd_reg.RegisterCommand(eCmdRemoveProject, "&Remove Project", "Remove Project",
83  "", "Remove Projects from the Workspace");
84  cmd_reg.RegisterCommand(eCmdMergeProjects, "&Merge Projects", "Merge Projects",
85  "", "");
86  cmd_reg.RegisterCommand(eCmdProjectTableView, "Open &Table View", "",
87  "", "Open Table View On Project");
88 
89  // Window commands
90  cmd_reg.RegisterCommand(eCmdActivateClients, "Activate", "Activate",
91  "", "Activates selected views");
92 
93  cmd_reg.RegisterCommand(eCmdCloseProjectView, "&Close View", "Close View",
94  "", "Closes selected project views");
95  cmd_reg.RegisterCommand(eCmdCloseAllProjectViews, "Close &All Views", "Close All Views",
96  "", "Closes all project views");
97 
98  cmd_reg.RegisterCommand(eCmdEnableDisable, "Enable / Disable", "Enable / Disable",
99  "", "Enable / Disable Project Item");
100  cmd_reg.RegisterCommand(eCmdNewFolder, "New Folder...", "New Folder...",
101  "", "Creates a new folder");
102 
103  // Export
104  cmd_reg.RegisterCommand(eCmdExportObject, "Export Data...", "Exports selected object(s)", "", "");
105 
106  cmd_reg.RegisterCommand(eCmdBroadcastOptions, "&Broadcast Options...", "Broadcast Options",
107  "menu::broadcast_options", "Shows a dialog with Selection Broadcasting options");
108 
109  cmd_reg.RegisterCommand(eCmdWindowMaskerFiles, "&WindowMasker Data...", "WindowMasker Data",
110  "menu::winmask_data_dnld", "Shows a dialog for WindowMasker data files download");
111 
112  // Data Mining panel - create feature from search results
114  "&Create New Feature", "Create New Feature", "", "");
115 
116  // Register icon aliases
117  provider.RegisterFileAlias(wxT("menu::broadcast"), wxT("broadcast.png"));
118  provider.RegisterFileAlias(wxT("menu::broadcast_range"), wxT("broadcast_range.png"));
119 }
120 
121 
CUICommandRegistry is a centralized registry where all application commands should be registered.
Definition: ui_command.hpp:146
int RegisterCommand(CUICommand *cmd)
assumes ownership of the given object returns a command id (useful when registry is used for auto id ...
Definition: ui_command.cpp:198
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
void Core_RegisterCommands(CUICommandRegistry &cmd_reg, wxFileArtProvider &provider)
Registers commands defined in gui_core library (see below), also registers icons for the commands.
Definition: commands.cpp:42
@ eCmdUnLoadProject
Definition: commands.hpp:77
@ eCmdOpenViewDefault
Definition: commands.hpp:106
@ eCmdShowHideDisabledItems
Definition: commands.hpp:72
@ eCmdEnableDisable
Definition: commands.hpp:96
@ eCmdBroadcastOptions
Definition: commands.hpp:103
@ eCmdBroadcastSel
Definition: commands.hpp:52
@ eCmdRemoveProject
Definition: commands.hpp:78
@ eCmdCloseAllProjectViews
Definition: commands.hpp:86
@ eCmdWindowMaskerFiles
Definition: commands.hpp:104
@ eCmdCloseWorkspace
Definition: commands.hpp:71
@ eCmdCloseProjectView
Definition: commands.hpp:85
@ eCmdExportObject
Definition: commands.hpp:101
@ eCmdProjectTableView
Definition: commands.hpp:81
@ eCmdMergeProjects
Definition: commands.hpp:80
@ eCmdBroadcastSelRange
Definition: commands.hpp:53
@ eCmdAddNewProject
Definition: commands.hpp:75
@ eCmdLoadProject
Definition: commands.hpp:76
@ eCmdCreateFeature
Definition: commands.hpp:108
@ eCmdNewFolder
Definition: commands.hpp:95
@ eCmdActivateClients
Definition: commands.hpp:87
@ eCmdOpenView
Definition: commands.hpp:67
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define wxT(x)
Definition: muParser.cpp:41
Modified on Fri Jun 14 16:48:25 2024 by modify_doxy.py rev. 669887