Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: _madRat on April 13, 2016, 01:27:18 PM

Title: flViewer - simple and fast image viewer on FLTK-1.3
Post by: _madRat on April 13, 2016, 01:27:18 PM
Simple, Fast and modular picture viewer.

(http://forum.tinycorelinux.net/index.php?action=dlattach;topic=19875.0;attach=4585)

Build tcz - just download attachment and sources into flviewer directory.

sources:
wget https://github.com/madrat-/flviewer/archive/1.0.0.tar.gz (https://github.com/madrat-/flviewer/archive/1.0.0.tar.gz) -O flviewer-1.0.0.tar.gz
wget http://mupdf.com/downloads/mupdf-1.8-source.tar.gz (http://mupdf.com/downloads/mupdf-1.8-source.tar.gz)


After building you get main flviewer package (24K) (support jpeg/png/bmp, gif and xpm, xbm), it's localization, dev package and additional modules for supporting tiff (requires libtiff) and pdf (statically compiled with mupdf - very big - about 5M, but includes full support pdf, tiff, jpeg, xps and cbz).

Feel free to ask me about this application.
Title: Re: flViewer - simple and fast image viewer on FLTK-1.3
Post by: madRat on January 16, 2018, 11:38:40 AM
Hi, All
I have update build script and patches for tinycore 8.2 and offer they for you.
Title: Re: flViewer - simple and fast image viewer on FLTK-1.3
Post by: ipmeel on July 01, 2018, 07:46:44 AM
How to build a GUI application without minimize, resize icons on title bar using FLTK & gcc?
Title: Re: flViewer - simple and fast image viewer on FLTK-1.3
Post by: polikuo on July 01, 2018, 07:56:23 AM
How to build a GUI application without minimize, resize icons on title bar using FLTK & gcc?
Hi, not exactly what you want, but I found this (https://www.mail-archive.com/nanogui@linuxhacker.org/msg01009.html) on the internet.
Please refer to the Fl_Window Class Reference (http://www.fltk.org/doc-1.3/classFl__Window.html#ab1f6119abc21b6636a13651b89bef1da).
Title: Re: flViewer - simple and fast image viewer on FLTK-1.3
Post by: Pats on July 01, 2018, 01:20:13 PM
Quote
How to build a GUI application without minimize, resize icons on title bar using FLTK & gcc?


1) Create a FLTK modal window .
 Use of a FLTK modal window means dialog window is one option which does not have close functionality and icon  . To exit this modal window, we have to use fl_ask() function. For eq:
FL/fl_ask.h.

if (fl_ask("Do you really want to save and exit?"))   
save_and_exit();

2) When we try to close  the  FLTK window , the default  callback function of Fl_Window is called .  We can set our own window callback to a different value, by overriding the default close / hide functionality of the window.
 The default callback function allows the user to save and  exit, don't save, or cancel.

The FLTK man page defination is : 

 static void window_cb (Fl_Widget *widget, void *)
{    Fl_Window *window = (Fl_Window *)widget;   
// fl_choice presents a modal dialog window with up to three choices.    int result = fl_choice("Do you want to save before quitting?,               "Don't Save", 
// 0              "Save",       
 // 1               "Cancel"     
// 2                           );   

if (result == 0)
 { 
// Close without saving       
hide();    }
 else if (result == 1)

// Save and close       
 save();        window->hide();    }
 else if (result == 2)
 { 
// Cancel / don't close     
  // don't do anything   
}
}

You can define your own window callback function  in your main function:
window->callback( win_cb );