(
m_Records.size());
98 static stringsInfo =
"Information";
99 static stringsError =
"Error";
100 static stringsWarning =
"Warning";
101 static stringsInvalid =
"Invalid Type";
122 returnwxString::FromUTF8( rec->
GetTitle().c_str() );
130 returnwxString::FromUTF8( s.c_str() );
136 returnwxString::FromUTF8( s.c_str() );
140 returnwxEmptyString;
147 return wxT(
"string");
178 for(
size_t i= 0;
i<
n;
i++ ) {
194 #define ID_TABLE 10001 195 #define ID_TOOLBAR 10002 232 #ifdef __WXOSX_COCOA__ 233SetBackgroundStyle(wxBG_STYLE_COLOUR);
234SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_FRAMEBK));
237wxPanel::Create(parent,
id, pos,
size);
259wxSizer* sizer =
newwxBoxSizer(wxVERTICAL);
263 longstyle = wxTB_FLAT | wxTB_HORIZONTAL | wxTB_TEXT | wxTB_HORZ_LAYOUT;
264wxToolBar* tool_bar =
newwxToolBar(
this,
ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, style);
266wxBitmap bmp_error = wxArtProvider::GetBitmap(
wxT(
"menu::error16x16"));
267wxBitmap bmp_warning = wxArtProvider::GetBitmap(
wxT(
"menu::warning16x16"));
268wxBitmap bmp_info = wxArtProvider::GetBitmap(
wxT(
"menu::info16x16"));
269wxBitmap bmp_details = wxArtProvider::GetBitmap(
wxT(
"menu::htmpage16x16"));
271tool_bar->AddCheckTool(
eCmdShowErrors,
wxT(
"Errors"), bmp_error, wxNullBitmap,
wxT(
"Show error messages"));
272tool_bar->AddCheckTool(
eCmdShowWarnings,
wxT(
"Warnings"), bmp_warning, wxNullBitmap,
wxT(
"Show warning messages"));
273tool_bar->AddCheckTool(
eCmdShowInfo,
wxT(
"Info"), bmp_info, wxNullBitmap,
wxT(
"Show information messages"));
274tool_bar->AddSeparator();
275tool_bar->AddTool(
eCmdDetails,
wxT(
"Details"), bmp_details,
wxT(
"Show event details"));
278sizer->Add(tool_bar, 0, wxEXPAND);
281wxStaticLine* line =
newwxStaticLine(
this, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
282sizer->Add(line, 0, wxEXPAND);
285style = wxLC_REPORT | wxLC_VIRTUAL | wxBORDER_NONE;
287 m_Table->SetSingleStyle(wxLC_SINGLE_SEL);
289sizer->Add(
m_Table, 1, wxEXPAND);
375aMenu.Append( wxID_SEPARATOR,
wxT(
"Settings") );
383 void*
data= anEvent.GetClientData();
384menu =
data? (wxMenu*)
data:
newwxMenu();
389anEvent.SetClientData( menu );
394anEvent.SetClientData(
NULL);
398 Merge( *main_menu.get(), *menu );
401PopupMenu( main_menu.get() );
411 autosel_index =
m_Table->GetFirstSelected();
489"Event View displays
alist of application events.",
490"Event View displays
alist of application events.",
521 return table->GetEventHandler();
649 if(print == fingerprint) {
658 static stringsid(
"event_view_factory");
665 static stringslabel(
"Event View Factory");
CEventLogService - the standard implementation of IEventLogService.
CEventTablePanel - the table displaying events; used in Event View.
CEventViewFactory - factory for creating Event View.
CEventViewModel - a model for Event View table.
CEventView - system view that displays events from Event Logging Service.
CEvent - generic event implementation TODO TODO - Attachments.
CExtensionDeclaration - static declaration helper.
CRegistryWriteView GetWriteView(const string §ion)
get a read-write view at a particular level.
static CGuiRegistry & GetInstance()
access the application-wide singleton
CRegistryReadView GetReadView(const string §ion) const
get a read-only view at a particular level.
class CRegistryReadView provides a nested hierarchical view at a particular key.
bool GetBool(const string &key, bool default_val=false) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
class CRgbaColor provides a simple abstraction for managing colors.
CViewTypeDescriptor - holds description of a view type.
virtual void x_FireDataChanged()
CwxTableListCtrl - generic wxListCtrl-based Table Control.
int RowVisibleToData(int aRow) const
/////////// Row staff /////////////////
void LoadTableSettings(const CRegistryReadView &view, bool byName=false)
void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const
void SetModel(IwxTableModel *data_model, bool own=false)
IEventLogService - records application events.
IView - represents a standard visual part of Workbench UI.
CFingerprint identifies an instance of IWMClient and is used for labeling layout positions.
ELabel
Different flavors of label types for different GUI aspects.
IWorkbench is the central interface in the application framework.
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
static CExtensionDeclaration decl("view_manager_service::view_factory", new CEventViewFactory())
register the factory
static const char * kShowInfoTag
static string sTypeToString(IEventRecord::EType type)
const char * kTableSection
#define ID_TABLE
CEventTablePanel.
static const char * kShowWarningsTag
static const char * kShowErrorsTag
CEventViewModel * m_Model
void OnShowErrors(wxCommandEvent &event)
CEventTablePanel * m_Panel
virtual void SetWorkbench(IWorkbench *workbench)
connect / disconnect this view with / from Workbench
CIRef< T > GetServiceByType()
retrieves a typed reference to a service, the name of C++ type is used as the name of the service.
virtual string GetTitle() const =0
virtual void LoadSettings()
void OnItemActivated(wxListEvent &event)
virtual size_t GetRecordsCount() const =0
returns the total number of records
virtual wxString GetColumnName(int col) const
Returns a default name for the column using spreadsheet conventions: A, B, C, ...
void OnDetails(wxCommandEvent &event)
virtual IView * CreateInstance() const
creates a view instance
virtual void SaveSettings() const
virtual string GetIconAlias() const
returns an icon alias that can be used to retrieve the client's icon
virtual void AppendMenuItems(wxMenu &aMenu)
void SetRecord(const IEventRecord &record)
CEventViewModel(IEventLogService *service)
CEventView.
virtual void SetRegistryPath(const string &path)
virtual const IEventRecord * GetRecord(size_t index) const =0
returns the record with the specified index
virtual void SaveSettings() const
IEventLogService * m_Service
void Init()
Initialises member variables.
virtual string GetExtensionIdentifier() const
returns the unique human-readable identifier for the extension the id should use lowercase letters se...
virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const
if fingerprint is recognized - creates and returns a new instance
static bool m_IconsInitialized
static CViewTypeDescriptor m_TypeDescr
CEventView.
CConstIRef< IEventRecord > TCRefRec
virtual wxWindow * GetWindow()
returns a pointer to the wxWindow representing the client
virtual void Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
virtual const TTime & GetTime() const =0
virtual const CRgbaColor * GetColor() const
returns a color associated with the client, n/a if NULL
void OnShowDetailsDialog(long vis_index)
virtual void SetColor(const CRgbaColor &color)
returns a color associated with the client
void ShowType(IEventRecord::EType type, bool show, bool up=true)
virtual CFingerprint GetFingerprint() const
returns a fingerprint identifying the client
CwxTableListCtrl * m_Table
void OnUpdateShowInfo(wxUpdateUIEvent &event)
IEventLogService * m_Service
virtual void LoadSettings()
void OnUpdateShowErrors(wxUpdateUIEvent &event)
virtual const wxMenu * GetMenu()
returns a menu (must be deleted by the caller) menu injections should follow a separator named "Contr...
virtual string GetDescription() const =0
virtual int GetNumColumns() const
Returns the number of columns in the model.
void CreateControls()
Creates the controls and sizers.
void x_OnNewRecord(CEvent *)
virtual void DestroyViewWindow()
destroy Window corresponding to the view
virtual int GetNumRows() const
Returns the number of rows in the model.
CEventLogService * m_Service
CwxTableListCtrl * GetTable()
virtual void CreateViewWindow(wxWindow *parent)
create Window corresponding to the view
virtual const CViewTypeDescriptor & GetTypeDescriptor() const
return an object providing meta information about thei view type
virtual EType GetType() const =0
void OnUpdateShowWarnings(wxUpdateUIEvent &event)
void OnShowInfo(wxCommandEvent &event)
virtual wxVariant GetValueAt(int row, int col) const
void OnShowWarnings(wxCommandEvent &event)
virtual wxEvtHandler * GetCommandHandler()
returns a pointer to the command handler (for menu commands and updates)
virtual void SetRegistryPath(const string &path)
void CreateModel(IEventLogService *service)
bool IsTypeShown(IEventRecord::EType type)
virtual void UpdateMenu(wxMenu &root_menu)
virtual string GetClientLabel(IWMClient::ELabel ltype=IWMClient::eDefault) const
returns the client label (name) to be displayed in UI
virtual string GetExtensionLabel() const
returns a displayable label for this extension ( please capitalize the key words - "My Extension" )
void OnUpdateDetails(wxUpdateUIEvent &event)
virtual wxString GetColumnType(int col) const
Tries to extract actual type from row 0 value if it exists.
virtual ~CEventTablePanel()
virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const
returns a Descriptor for the View Type supported by the Factory
std::deque< TCRefRec > m_Records
void OnContextMenu(wxContextMenuEvent &event)
virtual void RegisterIconAliases(wxFileArtProvider &provider)
CEventViewFactory.
@ eMaxCols
this must be the last!
virtual void RemoveListener(CEventHandler *listener)
Remove a listener.
virtual const string & GetIconAlias() const
#define ON_EVENT(type, id, handler)
#define END_EVENT_MAP()
Ends definition of Command Map.
#define BEGIN_EVENT_MAP(thisClass, baseClass)
Begins definition of Command Map for CEventHandler-derived class.
virtual void AddListener(CEventHandler *listener, int pool_name=ePool_Default)
Add a listener.
virtual const string & GetLabel() const
string GetLabel(const CSeq_id &id)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
CTime & ToLocalTime(void)
Convert the time into local time.
void SetFormat(const char *fmt, TFlags flags=fDefault)
Set the current time format.
string AsString(const CTimeFormat &format=kEmptyStr, TSeconds out_tz=eCurrentTimeZone) const
Transform time to string.
@ eMinute
Check condition - new minute.
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
const struct ncbi::grid::netcache::search::fields::SIZE size
wxMenu * CreateContextMenuBackbone()
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
#define row(bind, expected)
wxFileArtProvider * GetDefaultFileArtProvider()
void Merge(wxMenu &menu_1, const wxMenu &menu_2)
merges all items form menu_2 into menu_1, preserving the structure if possible
wxString ToWxString(const string &s)
void CleanupSeparators(wxMenu &menu)
Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4