49 #include <wx/srchctrl.h>
82 Create(parent,
id, pos,
size, style);
115 SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY);
134 static bool sImagesRegistered =
false;
135 if (!sImagesRegistered) {
139 sImagesRegistered =
true;
143 m_Toolbar =
new wxAuiToolBar(
this,
wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_LAYOUT | wxBORDER_NONE);
164 .RightDockable(
false)
165 .BottomDockable(
false)
168 .DestroyOnClose(
true)
181 if (
objects.size() != 1)
return false;
219 if (
data.IsEntrys()) {
234 seh =
m_Scope->GetSeq_entryHandle(*entry);
243 else if (seq_annot) {
260 objs.push_back(scoped_object);
351 vector<IEditorFactory*> factories;
354 ITERATE(vector<IEditorFactory*>, it, factories) {
383 switch (event.GetId()) {
412 switch (event.GetKeyCode()) {
414 case WXK_NUMPAD_ENTER:
425 if (search.empty()) {
User-defined methods of the data storage class.
Defines a scrollable canvas for drawing purposes.
void SetMainItem(IDesktopItem *main_item, int state=0)
void SetContext(CDesktopViewContext *context)
CDesktopViewContext * GetContext() const
int GetExpansionLevel() const
void SetSelectedObjects(const TConstObjects &objs)
bool FindText(const string &search)
void GetSelectedObjects(TConstObjects &objects) const
CIRef< IDesktopItem > GetRootDesktopItem() const
ESavedObjectType GetSavedObjectType() const
@ eSavedObjectType_not_set
const CSerialObject * GetSavedObject() const
wxSearchCtrl * m_SearchCtrl
wxAuiManager m_AuiManager
CDesktopViewContext * x_CreateDesktopViewContext()
virtual bool InitWidget(TConstScopedObjects &objects)
void Init()
Initialises member variables.
virtual void DataChanged()
virtual void GetSelectedObjects(TConstObjects &objects) const
virtual void SetUndoManager(ICommandProccessor *cmdProccessor)
void OnZoomInClick(wxCommandEvent &event)
virtual void DataChanging()
CDesktopCanvas * m_TextWindow
The canvas where all drawing takes place.
void OnMouseClick(wxMouseEvent &event)
void OnSearchCtrlClick(wxCommandEvent &event)
int m_MaxExpansion
Maximum level of expansion to be shown for the main object.
CDesktopViewContext::ESavedObjectType m_SavedType
void Load(int state=0)
Calls the builder (CDesktopDataBuilder) that creates all desktop items.
ICommandProccessor * m_CmdProccessor
CSeqDesktopPanel()
Constructors.
void UpdateZoomOut(wxUpdateUIEvent &event)
CIRef< IBioseqEditor > x_CreateEditor()
Creates the IBioseqEditor event handler. This is responsible for the Edit & Delete context menu items...
virtual void SetHost(IGuiWidgetHost *host)
virtual const CObject * GetOrigObject() const
void UpdateZoomIn(wxUpdateUIEvent &event)
void GetMainObjects(TConstScopedObjects &objs) const
void OnCopySelection(wxCommandEvent &event)
virtual void SetSelectedObjects(const TConstObjects &objects)
void OnCutSelection(wxCommandEvent &event)
void x_FindText(const string &search)
void OnSearchCtrlEnter(wxKeyEvent &event)
void x_SaveSelection()
Obtains the saved object and its type from the context for a possible, future Paste operation.
CConstRef< CSerialObject > m_SO
Main object to be displayed.
IGuiWidgetHost * m_WidgetHost
void CreateControls()
Creates the controls and sizers.
virtual ~CSeqDesktopPanel()
Destructor.
CRef< objects::CScope > m_Scope
Scope of the main object.
CConstRef< CSerialObject > m_SavedObject
void x_SetMaxExpansionLevel(void)
Sets m_MaxExpansion for the main object.
void OnZoomOutClick(wxCommandEvent &event)
Base class for all serializable objects.
Undo/Redo interface for editing operations.
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
EDialogReturnValue NcbiInfoBox(const string &message, const string &title="Info")
specialized Message Box function for reporting general information messages
CRef< objects::CScope > scope
void GetExtensionAsInterface(const string &ext_point_id, vector< CIRef< I > > &interfaces)
GetExtensionAsInterface() is a helper function that extracts all extensions implementing the specifie...
vector< CConstRef< CObject > > TConstObjects
EDialogReturnValue NcbiMessageBox(const string &message, TDialogType type=eDialog_Ok, EDialogIcon icon=eIcon_Exclamation, const string &title="Error", EDialogTextMode text_mode=eRaw)
CConstRef< CObject > object
vector< SConstScopedObject > TConstScopedObjects
virtual bool Send(CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Sends an event synchronously.
@ eEvent_Message
message from one class to another
CSeq_entry_Handle GetTopLevelEntry(void) const
Get top level Seq-entry handle.
TObjectType * GetPointer(void) const THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
void Reset(void)
Reset reference object.
TObjectType * GetPointerOrNull(void) const THROWS_NONE
Get pointer value.
TObjectType & GetObject(void) const
Get object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsSetData(void) const
Check if a value has been assigned to Data data member.
list< CRef< CSeq_entry > > TEntrys
const TData & GetData(void) const
Get the Data member data.
#define EXT_POINT__EDITOR_FACTORY
const struct ncbi::grid::netcache::search::fields::SIZE size
static const wxChar * pszMainToolbar
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
static CS_CONTEXT * context
static wxAcceleratorEntry entries[3]
wxFileArtProvider * GetDefaultFileArtProvider()
string ToStdString(const wxString &s)