A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/task__view_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/framework/task_view.cpp Source File

50 #include <wx/artprov.h> 54 #include <wx/toolbar.h> 55 #include <wx/statline.h> 68

: m_TaskService(manager)

83  return static_cast<int>

(

m_Records

.size());

96  const char

* fmt =

"$d days $h hrs $m min $h sec"

;

99

}

else if

(sec < 3600) {

100

fmt =

"$m min $s sec"

;

101

}

else if

(sec < 3600 * 24) {

102

fmt =

"$h hrs $m min $m sec"

;

118  return

wxString::FromUTF8(s.c_str());

127  return

wxString::FromUTF8(s.c_str());

133  CTime

t1(rec->m_StartTime);

145  return wxT

(

"Error"

);

151  return wxT

(

"string"

);

203  for

(

size_t i

= 0;

i

< recs.size();

i

++ ) {

210  if

(display_delay > 0) {

211  int

time_diff =

static_cast<int>

(curr - rec->m_StartTime);

212  if

(time_diff < display_delay) {

229 #define ID_TABLE 10001 230 #define ID_TOOLBAR 10002 255

m_TaskService(

NULL

),

272 #ifdef __WXOSX_COCOA__ 273

SetBackgroundStyle(wxBG_STYLE_COLOUR);

274

SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_FRAMEBK));

277

wxPanel::Create(parent,

id

, pos,

size

);

291

wxSizer* sizer =

new

wxBoxSizer(wxVERTICAL);

295

wxToolBar* tool_bar =

new

wxToolBar(

this

,

ID_TOOLBAR

, wxDefaultPosition, wxDefaultSize,

296

wxTB_FLAT | wxTB_HORIZONTAL | wxTB_TEXT |wxTB_NOICONS | wxTB_HORZ_LAYOUT );

298

wxButton*

b

=

new

wxButton(tool_bar,

eCmdDetails

,

_

(

"Details"

),

299

wxDefaultPosition, wxDefaultSize, wxNO_BORDER );

300  b

->SetToolTip(

wxT

(

"Show event details"

));

301

tool_bar->AddControl(

b

);

304

tool_bar->AddTool(

eCmdDetails

,

wxT

(

"Details"

), bm_empty,

wxT

(

"Show event details"

));

308

sizer->Add(tool_bar, 0, wxEXPAND);

312  new

wxStaticLine(

this

, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);

314

sizer->Add(line, 0, wxEXPAND);

317  long

style = wxLC_REPORT | wxLC_VIRTUAL | wxBORDER_NONE;

323  m_Table

->SetSingleStyle(wxLC_SINGLE_SEL);

325

sizer->Add(

m_Table

, 1, wxEXPAND);

364

vector<TTaskRef> tasks;

382  for

(

size_t i

= 0;

i

< rows.size();

i

++ ) {

384

tasks.push_back(task);

399

vector<TTaskRef>::iterator it = std::find(tasks.begin(), tasks.end(), task);

400  if

(it != tasks.end()) {

401

rows.push_back(

row

);

412

aMenu.Append( wxID_SEPARATOR,

wxT

(

"Actions"

) );

415

aMenu.Append( wxID_SEPARATOR,

wxT

(

"Settings"

) );

423  void

*

data

= anEvent.GetClientData();

424

menu =

data

? (wxMenu*)

data

:

new

wxMenu();

429

anEvent.SetClientData( menu );

434

anEvent.SetClientData(

NULL

);

438  Merge

( *main_menu.get(), *menu );

441

PopupMenu( main_menu.get() );

451  long

sel_index =

m_Table

->GetFirstSelected();

483

dlg.

SetTime

(var.GetString());

499  if

(

m_Table

->GetSelectedItemCount() == 1) {

500  auto

sel_index =

m_Table

->GetFirstSelected();

513  long

sel_index =

m_Table

->GetFirstSelected();

567

"Task View displays

a

list of application task such as running commands and tools.",

568

"Task View displays

a

list of application task such as running commands and tools.",

575

: m_TaskService(

NULL

),

719  if

(print == fingerprint) {

728  static string

sid(

"task_view_factory"

);

735  static string

slabel(

"Task View Factory"

);

CAppTaskService - Application Task Service.

static string StateToString(ETaskState state)

virtual void SetRegistryPath(const string &path)

CEvent - generic event implementation TODO TODO - Attachments.

CExtensionDeclaration - static declaration helper.

static string MakeKey(const string &section, const string &key, const string &delim=CGuiRegistry::kDecimalDot)

create a key from a section and a subkey

CRegistryWriteView GetWriteView(const string &section)

get a read-write view at a particular level.

static CGuiRegistry & GetInstance()

access the application-wide singleton

CRegistryReadView GetReadView(const string &section) const

get a read-only view at a particular level.

class CRegistryReadView provides a nested hierarchical view at a particular key.

class CRgbaColor provides a simple abstraction for managing colors.

CTaskTablePanel - panel that owns a Table and a Table Model, this is the window for CTaskView.

CTaskViewModel - table model for Task View.

CTaskView - IView, that uses CTaskTablePanel as its window.

CViewTypeDescriptor - holds description of a view type.

virtual void x_FireDataChanged()

CwxTableListCtrl - generic wxListCtrl-based Table Control.

void SetContextMenuEventPropagation(bool flag)

int RowVisibleToData(int aRow) const

/////////// Row staff /////////////////

void LoadTableSettings(const CRegistryReadView &view, bool byName=false)

wxArrayInt GetDataRowsSelected() const

void SaveTableSettings(CRegistryWriteView &view, bool saveSorting=true) const

void SetModel(IwxTableModel *data_model, bool own=false)

void SetDataRowsSelected(const vector< int > &rows)

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 const char * str(char *buf, int n)

bool CancelTask(IAppTask &task, bool throw_on_error=true)

Places a request to cancel a backgrounded task.

virtual void SetRegistryPath(const string &path)

virtual void CreateModel(CAppTaskService *task_srv)

virtual void SaveSettings() const

virtual void SaveSettings() const

virtual int GetStatusDisplayDelay()=0

returns delay in seconds used for certain fast (and not very important tasks) to only show its status...

virtual void SetColor(const CRgbaColor &color)

returns a color associated with the client

CAppTaskService * m_TaskService

virtual string GetExtensionIdentifier() const

returns the unique human-readable identifier for the extension the id should use lowercase letters se...

void OnUpdateDetails(wxUpdateUIEvent &event)

virtual wxString GetColumnName(int col) const

Returns a default name for the column using spreadsheet conventions: A, B, C, ...

virtual wxString GetColumnType(int col) const

Tries to extract actual type from row 0 value if it exists.

CAppTaskService * m_TaskService

virtual void DestroyViewWindow()

destroy Window corresponding to the view

CTaskTablePanel * m_Panel

virtual const CViewTypeDescriptor & GetTypeDescriptor() const

return an object providing meta information about thei view type

virtual CFingerprint GetFingerprint() const

returns a fingerprint identifying the client

virtual ~CTaskTablePanel()

void SetState(wxString value)

virtual void DestroyModel()

virtual string GetClientLabel(IWMClient::ELabel ltype=IWMClient::eDefault) const

returns the client label (name) to be displayed in UI

virtual void Create(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)

void OnEventTimer(wxTimerEvent &event)

void OnUpdateCancel(wxUpdateUIEvent &event)

virtual string GetStatusText() const =0

returns human-readable text describing the current task state

virtual void LoadSettings()

virtual int GetNumRows() const

Returns the number of rows in the model.

void ShowTasksByState(IAppTask::ETaskState state, bool show, bool up=true)

CwxTableListCtrl * m_Table

virtual void SetWorkbench(IWorkbench *workbench)

connect / disconnect this view with / from Workbench

CAppTaskService::TRecRefVec TRecRefVec

virtual const wxMenu * GetMenu()

returns a menu (must be deleted by the caller) menu injections should follow a separator named "Contr...

virtual wxVariant GetValueAt(int row, int col) const

virtual void LoadSettings()

void SetTaskTitle(wxString value)

void x_AddTasks(TRecRefVec &tasks)

CAppTaskService * m_TaskService

void GetBackgroundedTasks(TRecRefVec &tasks)

virtual void AppendMenuItems(wxMenu &aMenu)

virtual void RegisterIconAliases(wxFileArtProvider &provider)

CTaskViewFactory.

virtual const CRgbaColor * GetColor() const

returns a color associated with the client, n/a if NULL

virtual wxWindow * GetWindow()

returns a pointer to the wxWindow representing the client

virtual void Init()

Initializes member variables.

vector< TRecordRef > m_Records

virtual ETaskState GetState()=0

returns the current task state

void x_SetSelectedTasks(vector< TTaskRef > &tasks)

void x_OnUpdate(CEvent *)

ETaskState

List of task states defining the task management FSM.

bool IsStateShown(IAppTask::ETaskState state)

void SetTime(wxString value)

static CViewTypeDescriptor m_TypeDescr

CTaskView.

TTaskRef GetTask(int row)

CTaskViewModel(CAppTaskService *task_srv)

CTaskView.

void SetStatus(wxString value)

void OnCancel(wxCommandEvent &event)

virtual int GetNumColumns() const

Returns the number of columns in the model.

virtual void UpdateTable()

void OnShowDetailsDialog(long vis_index)

virtual string GetIconAlias() const

returns an icon alias that can be used to retrieve the client's icon

void OnDetails(wxCommandEvent &event)

void OnItemActivated(wxListEvent &event)

void x_GetSelectedTasks(vector< TTaskRef > &tasks)

virtual void CreateControls()

Creates the controls and sizers.

virtual void UpdateMenu(wxMenu &root_menu)

virtual void CreateViewWindow(wxWindow *parent)

create Window corresponding to the view

virtual CAppTaskService * GetAppTaskService()=0

virtual string GetExtensionLabel() const

returns a displayable label for this extension ( please capitalize the key words - "My Extension" )

virtual string GetDescr() const =0

returns a human-readable description of the Task (optional)

void OnContextMenu(wxContextMenuEvent &event)

void GetPendingTasks(TRecRefVec &tasks)

Inspection interface - supposed to be used from the main UI thread only.

virtual void SetRegistryPath(const string &path)

virtual IView * CreateInstanceByFingerprint(const TFingerprint &fingerprint) const

if fingerprint is recognized - creates and returns a new instance

virtual IView * CreateInstance() const

creates a view instance

virtual bool IsVisible()=0

returns true if the task should be visible in UI visible task shall represent operations understood b...

virtual const CViewTypeDescriptor & GetViewTypeDescriptor() const

returns a Descriptor for the View Type supported by the Factory

@ eMaxCols

this must be the last!

@ eBackgrounded

task is executing in background

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.

void SetFormat(const char *fmt, TFlags flags=fDefault)

Set the current time format.

time_t GetTimeT(void) const

Get time in time_t format.

string AsString(const CTimeFormat &fmt=kEmptyStr) const

Transform time span to string.

long GetCompleteSeconds(void) const

Get number of complete seconds.

@ eCurrent

Use current time. See also CCurrentTime.

@ eGmt

GMT (Greenwich Mean Time)

The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format

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)

static CExtensionDeclaration decl("view_manager_service::view_factory", new CTaskViewFactory())

register the factory

string sToUserFriendlyString(const CTimeSpan &span)

#define ID_TABLE

CTaskTablePanel.

static const char * kPanelSection

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 WindowSetText(const wxWindow &win, const wxChar *text)

Windows specific function, equivalent of SetWindowText() WinAPI.

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