add notcurses-keyplot #430

This commit is contained in:
nick black 2020-04-02 19:42:17 -04:00 committed by Nick Black
parent d541cda306
commit 5e27499194
4 changed files with 41 additions and 13 deletions

View File

@ -332,7 +332,7 @@ foreach(f ${POCSRCS})
PRIVATE include "${TERMINFO_INCLUDE_DIRS}"
)
target_link_libraries(${fe}
PRIVATE notcurses notcurses++ "${TERMINFO_LIBRARIES}"
PRIVATE notcurses++ "${TERMINFO_LIBRARIES}"
)
target_link_directories(${fe}
PRIVATE "${TERMINFO_LIBRARY_DIRS}"
@ -406,8 +406,8 @@ if(USE_DOXYGEN)
endif()
endif()
# notcurses-input
file(GLOB INPUTSRCS CONFIGURE_DEPENDS src/input/*.cpp)
# notcurses-input and notcurses-keyplot
file(GLOB INPUTSRCS CONFIGURE_DEPENDS src/input/input.cpp)
add_executable(notcurses-input ${INPUTSRCS})
target_include_directories(notcurses-input
PRIVATE
@ -416,7 +416,7 @@ target_include_directories(notcurses-input
)
target_link_libraries(notcurses-input
PRIVATE
notcurses notcurses++
notcurses++
)
target_compile_options(notcurses-input
PRIVATE
@ -427,9 +427,29 @@ target_compile_definitions(notcurses-input
FORTIFY_SOURCE=2
)
file(GLOB KEYPLOTSRCS CONFIGURE_DEPENDS src/input/keyplot.cpp)
add_executable(notcurses-keyplot ${KEYPLOTSRCS})
target_include_directories(notcurses-keyplot
PRIVATE
include
"${PROJECT_BINARY_DIR}/include"
)
target_link_libraries(notcurses-keyplot
PRIVATE
notcurses++
)
target_compile_options(notcurses-keyplot
PRIVATE
-Wall -Wextra -W -Wshadow ${DEBUG_OPTIONS}
)
target_compile_definitions(notcurses-keyplot
PRIVATE
FORTIFY_SOURCE=2
)
# notcurses-ncreel
file(GLOB ncreelSRCS CONFIGURE_DEPENDS src/ncreel/*.cpp)
add_executable(notcurses-ncreel ${ncreelSRCS})
file(GLOB NCREELSRCS CONFIGURE_DEPENDS src/ncreel/*.cpp)
add_executable(notcurses-ncreel ${NCREELSRCS})
target_include_directories(notcurses-ncreel
PRIVATE
include
@ -437,7 +457,7 @@ target_include_directories(notcurses-ncreel
)
target_link_libraries(notcurses-ncreel
PRIVATE
notcurses notcurses++
notcurses++
)
target_compile_options(notcurses-ncreel
PRIVATE
@ -489,7 +509,7 @@ target_link_directories(notcurses-view
)
target_link_libraries(notcurses-view
PRIVATE
notcurses notcurses++
notcurses++
PRIVATE
"${AVCODEC_LIBRARIES}"
"${AVFORMAT_LIBRARIES}"
@ -701,6 +721,7 @@ install(FILES
install(PROGRAMS src/pydemo/notcurses-pydemo DESTINATION bin)
install(TARGETS notcurses-demo DESTINATION bin)
install(TARGETS notcurses-input DESTINATION bin)
install(TARGETS notcurses-keyplot DESTINATION bin)
install(TARGETS notcurses-ncreel DESTINATION bin)
install(TARGETS notcurses-tester DESTINATION bin)
install(TARGETS notcurses-tetris DESTINATION bin)

View File

@ -2486,8 +2486,8 @@ typedef enum {
} ncgridgeom_e;
// Plots. Given a rectilinear area, an ncplot can graph samples along some axis.
// There is some underlying independent variable--this could be measurement
// number, or measurement time. Samples are tagged with this variable, which
// There is some underlying independent variable--this could be e.g. measurement
// sequence number, or measurement time. Samples are tagged with this variable, which
// should never fall, but may grow non-monotonically. The desired range in terms
// of the underlying independent variable is provided at creation time. The
// desired domain can be specified, or can be autosolved. Granularity of the
@ -2528,8 +2528,9 @@ typedef struct ncplot_options {
// number of "pixels" per row x column
ncgridgeom_e gridtype;
// independent variable can either be a contiguous range, or a finite set
// of keys.
// FIXME give parameters for variables
// of keys. for a time range, say the previous hour sampled with second
// resolution, the independent variable would be the range [0..3960).
int64_t minx, maxx;
} ncplot_options;
API struct ncplot* ncplot_create(struct ncplane* n, const ncplot_options* opts);

6
src/input/keyplot.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <cstdlib>
#include <ncpp/NotCurses.hh>
int main(void){
return EXIT_FAILURE; // FIXME
}

View File

@ -67,7 +67,7 @@ int main(void){
sopts.itemcount = sizeof(items) / sizeof(*items);
sopts.title = "this is truly an awfully long example of a MULTISELECTOR title";
sopts.secondary = "pick one (you will die regardless)";
sopts.footer = "press q to exit (there is sartrev(\"no exit\")";
sopts.footer = "press q to exit (there is sartrev(\"no exit\"))";
channels_set_fg(&sopts.boxchannels, 0x20e0e0);
channels_set_fg(&sopts.opchannels, 0xe08040);
channels_set_fg(&sopts.descchannels, 0xe0e040);