ICF 3.1.1.10
Technical documentation of ICF Libraries
ICommand.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// ICF includes
10#include <istd/TIHierarchical.h>
11#include <iprm/INameParam.h>
13
14
15namespace ibase
16{
17
18
23 virtual public iprm::INameParam,
24 virtual public iprm::IEnableableParam
25{
26public:
32 {
37 CF_PERMANENT = 0x0001,
38
43
48
52 CF_TOOLBAR = 0x0040,
53
57 CF_TOOLBOX = 0x0080,
58
62 CF_ONOFF = 0x0100,
63
67 CF_EXCLUSIVE = 0x0200
68 };
69
71 {
72 GI_NONE = -1,
74 GI_USER = 0x1000
75 };
76
80 virtual int GetPriority() const = 0;
81
87 virtual int GetGroupId() const = 0;
88
93 virtual int GetStaticFlags() const = 0;
94
100 virtual bool Execute(istd::IPolymorphic* contextPtr) = 0;
101};
102
103
108
109
110} // namespace ibase
111
112
Provides single command for interaction with user.
Definition ICommand.h:25
StaticFlags
Flags indicating attributes of command.
Definition ICommand.h:32
@ CF_CONTEXT_MENU
Enable to use this command in context menu.
Definition ICommand.h:47
@ CF_PERMANENT
If this is enabled command will be permanent accessible, even if context is not active.
Definition ICommand.h:37
@ CF_EXCLUSIVE
Enable exclusive selection of this command with other commands in the same node with the same group I...
Definition ICommand.h:67
@ CF_TOOLBAR
Enable to use this command in application toolbar.
Definition ICommand.h:52
@ CF_TOOLBOX
Enable to use this command in separated toolbox.
Definition ICommand.h:57
@ CF_ONOFF
Inform that this command can be turned on or off (checkable).
Definition ICommand.h:62
@ CF_GLOBAL_MENU
Enable to use this command in global application menu.
Definition ICommand.h:42
virtual int GetPriority() const =0
Get priority in the same group.
virtual int GetGroupId() const =0
Get group ID used to decide if separator should be used.
virtual bool Execute(istd::IPolymorphic *contextPtr)=0
Execute this command.
virtual int GetStaticFlags() const =0
Get static flags of this command.
Interface for objects which can be enabled/disabled.
Interface for a object containing simple text.
Definition INameParam.h:26
Common interface to define the hierarchical graph structures.
This namespace contains standard classes based on Qt.
istd::TIHierarchical< ICommand > IHierarchicalCommand
Hierarchical command structure used to create dynamic menu structures.
Definition ICommand.h:107

© Witold Gantzke and Kirill Lepskiy