Improved help.
This commit is contained in:
parent
50c64a0060
commit
e9d4096713
|
@ -4,6 +4,11 @@
|
|||
#include "cmCursesLongMessageForm.h"
|
||||
#include "cmCursesMainForm.h"
|
||||
|
||||
inline int ctrl(int z)
|
||||
{
|
||||
return (z&037);
|
||||
}
|
||||
|
||||
cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector<std::string>
|
||||
const& messages, const char*
|
||||
title)
|
||||
|
@ -160,14 +165,22 @@ void cmCursesLongMessageForm::HandleInput()
|
|||
{
|
||||
break;
|
||||
}
|
||||
else if ( key == KEY_DOWN )
|
||||
else if ( key == KEY_DOWN || key == ctrl('n') )
|
||||
{
|
||||
form_driver(m_Form, REQ_SCR_FLINE);
|
||||
}
|
||||
else if ( key == KEY_UP )
|
||||
else if ( key == KEY_UP || key == ctrl('p') )
|
||||
{
|
||||
form_driver(m_Form, REQ_SCR_BLINE);
|
||||
}
|
||||
else if ( key == KEY_NPAGE || key == ctrl('d') )
|
||||
{
|
||||
form_driver(m_Form, REQ_SCR_FPAGE);
|
||||
}
|
||||
else if ( key == KEY_PPAGE || key == ctrl('u') )
|
||||
{
|
||||
form_driver(m_Form, REQ_SCR_BPAGE);
|
||||
}
|
||||
|
||||
this->UpdateStatusBar();
|
||||
this->PrintKeys();
|
||||
|
|
|
@ -736,4 +736,43 @@ void cmCursesMainForm::HandleInput()
|
|||
}
|
||||
}
|
||||
|
||||
const char* cmCursesMainForm::s_ConstHelpMessage = "CMake is used to configure and generate build files for software projects. The basic steps for configuring a project are as follows:\n\n1. Select the source directory for the project. This should contain the CMakeLists.txt files for the project.\n\n2. Select the build directory for the project. This is the directory where the project will be built. It can be the same or a different directory than the source directory. For easy clean up, a separate build directory is recommended. CMake will create the directory if it does not exist.\n\n3. Once the source and binary directories are selected, it is time to press the Configure button. This will cause CMake to read all of the input files and discover all the variables used by the project. The first time a variable is displayed it will be in Red. Users should inspect red variables making sure the values are correct. For some projects the Configure process can be iterative, so continue to press the Configure button until there are no longer red entries.\n\n4. Once there are no longer red entries, you should click the OK button. This will write the build files to the build directory and exit CMake.";
|
||||
const char* cmCursesMainForm::s_ConstHelpMessage = "Welcome to ccmake, curses based user interface for CMake.\n"
|
||||
"CMake is used to configure and generate build files for software projects. "
|
||||
"The basic steps for configuring a project with ccmake are as follows:\n\n"
|
||||
"1. Run ccmake in the directory where you want the object and executable files to be placed (build directory). If the source directory is not the same as this build directory, you have to specify it as an argument on the command line.\n\n"
|
||||
"2. When ccmake is run, it will read the configuration files and display the current build options. "
|
||||
"If you have run CMake before and have updated the configuration files since then, any new entries will be displayed on top and will be marked with a *. "
|
||||
"On the other hand, the first time you run ccmake, all build options will be new and will be marked as such. "
|
||||
"At this point, you can modify any options (see keys below) you want to change. "
|
||||
"When you are satisfied with your changes, press 'c' to have CMake process the configuration files. "
|
||||
"Please note that changing some options may cause new ones to appear. These will be shown on top and will be marked with *. "
|
||||
"Repeat this procedure until you are satisfied with all the options and there are no new entries. "
|
||||
"At this point, a new command will appear: G)enerate and Exit. You can now hit 'g' to have CMake generate all the build files (i.e. makefiles or project files) and exit. "
|
||||
"At any point during the process, you can exit ccmake with 'q'. However, this will not generate/change any build files.\n\n"
|
||||
"ccmake KEYS:\n\n"
|
||||
"Navigation: "
|
||||
"You can use the arrow keys and page up, down to navigate the options. Alternatively, you can use the following keys: \n"
|
||||
" C-n : next option\n"
|
||||
" C-p : previous options\n"
|
||||
" C-d : down one page\n"
|
||||
" C-u : up one page\n\n"
|
||||
"Editing options: "
|
||||
"To change an option press enter or return. If the current options is a boolean, this will toggle it's value. "
|
||||
"Otherwise, ccmake will enter edit mode. In this mode you can edit an option using arrow keys and backspace. Alternatively, you can use the following keys:\n"
|
||||
" C-b : back one character\n"
|
||||
" C-f : forward one character\n"
|
||||
" C-a : go to the beginning of the field\n"
|
||||
" C-e : go to the end of the field\n"
|
||||
" C-d : delete previous character\n"
|
||||
" C-k : kill the rest of the field\n"
|
||||
"You can also delete an option by pressing 'd'\n\n"
|
||||
"Commands:\n"
|
||||
" q : quit ccmake without generating build files\n"
|
||||
" h : help, shows this screen\n"
|
||||
" c : process the configuration files with the current options\n"
|
||||
" g : generate build files and exit, only available when there are no "
|
||||
"new options and no errors have been detected during last configuration.\n"
|
||||
" l : shows last errors\n"
|
||||
" t : toggles advanced mode. In normal mode, only the most important options are shown. In advanced mode, all options are shown. We recommend using normal mode unless you are an expert.\n";
|
||||
|
||||
|
||||
|
|
|
@ -87,11 +87,6 @@ bool cmCursesStringWidget::HandleInput(int& key, FORM* form, WINDOW* w)
|
|||
{
|
||||
form_driver(form, REQ_END_FIELD);
|
||||
}
|
||||
else if ( key == ctrl('d') || key == 127 ||
|
||||
key == KEY_BACKSPACE )
|
||||
{
|
||||
form_driver(form, REQ_DEL_PREV);
|
||||
}
|
||||
else if ( key == ctrl('d') || key == 127 ||
|
||||
key == KEY_BACKSPACE || key == KEY_DC )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue