[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Looking for simple example

From: Jens Thoms Toerring
Subject: Re: [XForms] Looking for simple example
Date: Tue, 11 Nov 2014 17:07:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Jon,

On Tue, Nov 11, 2014 at 02:34:33PM +0000, jon wrote:
> Thanks for all the help. Sorry if you are getting tired of my
> questions !

I'm not tired at all, it's just that I'm extremely busy with
some work at the moment and thus my silence! I need some time
checking what happens with the timers, which I hadn't and I
don't want to make up some nonsense;-)

> I have printed the xforms documentation and hope to find
> more time to study it in more detail.
> Currently I have created a single form for my application, seems to be
> working well. All the buttons and sliders are functional and I have
> working network code behind it.
> I struggle a little with all the nested pointers and structures so the
> final part of the project are proving frustrating.
> What I am trying to do now is to make a new version of the application
> basically with tabbed windows. 
> Excuse the ASCII art, but something like this.

Me too!

>   ___________________________________
>   |   Form1        Form2
>   | _________________________________
>   | |Frame here, replace with form1 or form2
>   | |
>   | |
> The idea is that 3 forms are created, the outer one, I called "selector"
> is the main window. 
> Form1 and Form2 are the inner forms, I see from the fl_show_form()
> documentation I can have a window with no border.

You might be at the mercy of the window manager there - all
XForms can do is send a request to it, askung that it puts
no "decorations around the window. If the window manager
follows that request is outside of what XForms can control.

Since you've already found that I guess you've also found out
how you can make forms non-resizable: You need e.g. FL_PLACE_SIZE
or FL_PLACE GEOMETRY when calling fl_show_form().

>  What I am trying to
> do is to use the top left of the frame as an anchor for the top left of
> form1 OR form2, pushing the button displays one or other form on (or
> over) the frame.
> I want all the forms "active" as I need to modify controls on them even
> if not visible - but I only want the selected from1 or form2 visible in
> the inner window.
> I have tried to create this in form designer, looks promising, but when
> I try and add the code it segfaults when pushing the form buttons.

I guess I don't fully understand what you're try to do here. It
starts with that I don't see how fdesign can be made to create
forms within forms (that's a tricky thing anyway since normally
a "form" is basically a window of its own).

On the other hand, lots of what you write sounds like you're
trying to recreate an object type that already exists, the "tab-
folder" object. It's an object that allows you to embed a number
of forms, with a set of tab-riders that allow the user to switch
between them. You can design the forms to be embedded in fdesign
and then put them into the tabfolder object with calls of the
function fl_addto_tabfolder().

> I cant find a similar example in the xforms demos.

There's only one demo program that uses it, 'itest.c' - it's the
box that apears on the left-hand side/

> Final question, I still cant find a useful example of modifying pixmap
> data on the fly. I can see fl_get_pixmap_data() and fl_set_pixmap_data()
> but they seem to have very little in the way of documentation, and as
> usual for X related things any documentation around the subject assumes
> you are already an expert in X internals. I am more used to a raw
> framebuffer ..... 

Well, there aren't any functions for maipulating pixmaps, so
there's not much to document;-) What there is is an additional
library, libflimage.so. It's documented in the bery last chapter
of the dicumentation, but I've to admit that I never got around
to getting a good look at this stuff.

You also must keep in mind that XForms is a rather thin layer
on top of the Xlib, designed to allow use some widgets, but not
for lots of image manipulation. So there only very basic func-
tions for drawing, and for real nice effects you'll have to
resort to using Xlib functions. For pixmaps I'd guess that there
are some libraries out there that allow in-memory manipulation -
but I've never looked into that. Whenever I had to mess around
pixmaps in my programs I use Xlib functions...

What kind of stuff are you planning to do with those pixmaps?
Perhaps I can give you some pointers.

                          Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]