Commit 90a2608d authored by plgruener's avatar plgruener

show scrollable picture

parent 65891f3a
......@@ -9,8 +9,9 @@ add_executable(dynamicsystems main.cpp compute.cpp picture.cpp)
find_package(FLTK)
find_package(OpenGL)
add_executable(hello hello.cpp)
target_link_libraries(hello ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${-lfltk_images} ${-lfltk_png}")
add_executable(gui gui.cpp)
target_link_libraries(gui ${FLTK_LIBRARIES} ${OPENGL_LIBRARIES})
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
......
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Scroll.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Shared_Image.H>
#include <FL/Fl_PNG_Image.H>
int main (int argc, char **argv) {
fl_register_images();
Fl_Double_Window window(600,400,"Dynamic Systems");
Fl_Scroll scroll(0,0,600,400);
Fl_PNG_Image picture("picture.png");
Fl_Box box(0,0,picture.w(),picture.h());
box.image(picture);
window.resizable(window);
window.show();
return Fl::run();
}
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
int main (int argc, char **argv) {
Fl_Window *window = new Fl_Window(340,180);
Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!");
box->box(FL_UP_BOX);
box->labelfont(FL_BOLD+FL_ITALIC);
box->labelsize(36);
box->labeltype(FL_SHADOW_LABEL);
window->end();
window->show(argc, argv);
return Fl::run();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment