The Laxkit

  Main
  News
  Faq
  Documentation
    Downloading
    Compiling
    Hello World
    Todo
    Contact
  Download
  Links
  Contact
  

Documentation

Here is the source code page on github.



Downloading

You can grab the current source from the repository:

git clone http://github.com/Laidout/laxkit.git laxkit-git
Or you can browse the repository here. The Laxkit is licensed under the LGPL.

That I know of, there are currently 2 downloadable programs using the Laxkit. One is Laxinput, which lets you easily set up multiple independent mice and keyboards. This is currently included in the main Laxkit library code.

The other is desktop publishing software called Laidout, which has been the driving force behind my making the Laxkit.


Compiling the Library

The Laxkit depends on:

- libpng
- X11, Xi, and Xft
- cups
- Imlib2
- fontconfig
- freetype
- libssl
- libcairo (optional)
On a debian based system, you could type this command as root (or on ubuntu preface this with "sudo") to get them all:
apt-get install g++ libcairo2-dev libpng12-dev libx11-dev libxi-dev libcups2-dev libimlib2-dev libxft-dev libfontconfig-dev libfreetype-dev libssl-dev
All of these are usually available for all major linux distributions. When you're sure you have those things installed, just type:
./configure
make
make install

By default, this will cause liblaxkit.a, and liblaxinterfaces.a to be put in /usr/local/lib, and the header files will be put in /usr/local/include/lax-(whatever.version).

If you type ./configure --prefix=/your/own/install/path, then the laxkit will get installed in prefix/include, prefix/share/doc, prefix/lib, etc. What files were installed are put into the file install.log.

  • liblaxkit is the main core of the kit, consisting of buttons, text edits, and the like.
  • liblaxinterfaces is for lots of user interfaces to various artsy sorts of objects, like curvy lines and bezier color patch gradients.

  • This library currently is being developed on a Debian "unstable" Linux machine, but it has few dependencies at the moment, and should be relatively easy to get to compile on most Unix like systems. It works on my machine as they say. I am not aware of any one else in the universe using the Laxkit, so it will likely have lots of bugs that I've inadvertently learned to not activate. I only have a Linux machine and very little experience with other platforms, and I would very much like to hear of success/failure/accusations/insults/patches from attempts to compile on other platforms.


    Laxkit Hello World
    Here is a very simple Laxkit program.
    #include <lax/mesbar.h>
    using namespace Laxkit;
    
    int main(int argc,char **argv)
    {
       anXApp app;
       app.init(argc,argv);
       app.addwindow(new MessageBar(NULL,"mesbar","mesbar",MB_MOVE, 5,5,100,100,0, "Blah!"));
       app.run();
       return 0;
    }
    

    You would compile it something like this:
    g++ laxhello.cc -I/usr/include/freetype2 -L/usr/X11R6/lib \
          -lX11 -lm -lcairo -lpng -lcups `imlib2-config --libs` -lXi -lXft -lcrypto \
          -llaxkit -o laxhello
    

    It produces the following window:
    Laxhello output

    Note that this is the simplest case! If you use everything, including images and the interface classes, your compile line would look more like:
    g++ laxhello.cc -I/usr/include/freetype2 -L/usr/X11R6/lib \
          -lX11 -lm -lcairo -lpng -lcups `imlib2-config --libs` -lXi -lXft -lcrypto \
          -llaxinterfaces -llaxkit  -o laxhello
    


    ~~ TODO ~~

    Coding. I've already programmed something more or less working for about 85% of my planned widgets and interfaces. This existing code needs lots of cleanup. The most important goal is support for left-right, right-left and mixed fonts, and a good font dialog, which I should have done at about the 10% mark.

    Features planned but either not started or not functional include:

    • Easier dialog creation facility, with gui constructor similar to fltk's Fluid
    • an html-ish table container
    • a font dialog

    The doxygen documentation has a more extensive list of coding todo.



    Contacting

    If you have complaints and/or contributions as to how to streamline my dilettante code, please let me know. I'm sure there are a lot of little programming tricks and window manager pitfalls I haven't a clue about. "Chuck all this, and switch to Fltk or Gtkmm" is probably very good advice to me, but I don't want to hear it (but try again in one more year). Please help develop! I'd rather be drawing cartoons.

    Here is the person to complain to: Tom Lechner