コード例 #1
0
ファイル: current_command.cpp プロジェクト: jahrsg/swx
CurrentCommand::CurrentCommand
(   string const& p_command_word,
    vector<string> const& p_aliases,
    TimeLog& p_time_log
):
    Command
    (   p_command_word,
        p_aliases,
        "Print name of current activity",
        vector<HelpLine>
        {   HelpLine
            (   "Print the name of the current activity, or print a blank line if "
                    "currently inactive"
            )
        },
        false
    ),
    m_time_log(p_time_log)
{
    add_option
    (   's',
        "Do not terminate output with a newline",
        &m_suppress_newline
    );
}
コード例 #2
0
ファイル: help_command.cpp プロジェクト: jahrsg/swx
HelpCommand::HelpCommand
(   string const& p_command_word,
    vector<string> const& p_aliases,
    CommandManager const& p_command_manager
):
    Command
    (   p_command_word,
        p_aliases,
        "Print usage information",
        vector<HelpLine>
        {   HelpLine("Print general usage information"),
            HelpLine("Print usage information for COMMAND", "<COMMAND>")
        }
    ),
    m_command_manager(p_command_manager)
{
}
コード例 #3
0
ファイル: edit_command.cpp プロジェクト: jahrsg/swx
EditCommand::EditCommand
(   string const& p_command_word,
    vector<string> const& p_aliases
):
    Command
    (   p_command_word,
        p_aliases,
        "Open the activity log or configuration file in a text editor",
        vector<HelpLine>
        {   HelpLine
            (   "Open the activity log in a text editor; the editor used is "
                    "determined by the \"editor\" configuration setting"
            )
        },
        false
    )
{
    add_option
    (   'c',
        "Instead of opening the activity log, open the configuration file",
        &m_open_config_file
    );
}
コード例 #4
0
ファイル: ToolButton.cpp プロジェクト: koz4k/soccer
Bar::Item& ToolButton::Help(const char *help)
{
	HelpLine(help);
	return *this;
}
コード例 #5
0
ファイル: MenuItem.cpp プロジェクト: guowei8412/upp-mirror
Bar::Item& MenuItemBase::Help(const char *s)
{
	HelpLine(s);
	return *this;
}