News:

Function Finder  Find all the functions within source code files

Main Menu

Flexi Windows

Started by kevin, January 22, 2005, 08:38:03 AM

Previous topic - Next topic

kevin

Update V0.09:

 This is taking forever :( , got the  bright idea yesterday to make the task bar a window also.  As I was just going to hack it together, for the sake of the demo (ohh, what ever could it be? :) )   It didn't seem like a issue at the time, but this meant setting up priorities with windows.  Which ended up breaking most the events.  Anyway now you can have windows of various priorities.   They can clicked to the front of each priority group.   Since the task bar needs to be always at the front . It has a higher priority. Clicking the other windows won't cover it  

 Set set up some auto event generation stuff for window, so now the 'update events' routine can generate not only timed redraws but can force a windows update rate.  So regardless of the PB refresh rate the window is redrawn at it's own FPS.  You'll get some stutters here and there, but hey that happens :)  

 The cool thing about it, is that you don't have to manage the timing of the redraws yourself,  you set it and it just seems to occur.. as if by magic..

 The only thing not working is that while you can minimize a widow to the task bar,  you can't restore as i've not written that part yet :)

kevin


kevin

#17
Update V0.11

 I knew there was good reason why was going to hack together task bar window previously.. What was it?,  Well it was to avoid the need for parent/child infrastructure with windows.  

 The nice thing about task bar being a window, is that minimized windows merely need to be linked to the task bar window.  Which would have a bit of custom code to render the minimized icons.  This also means that i can trap clicks etc through the existing code basically.   But it's been a bit messing setting it up, and flip-flopping on a few ideas but it's slowly getting there.. I really don't want to have to return update it later.

 Another nice thing about linked windows.   The children are limited to the parents bounds though and you can't drag a window off the parents view port.   But there's a few issues with that still..   (due to changing ideas :) )

Once I get this working OK, it's time for that damn Kyruss tech demo...

kevin

#18
Flex GUI V0.13

 Well here's prolly the last tech demo of Flexi.  This one has the main devices/controls integrated together.  So now the taskbar actually functions.   There's still a few known issues, but nothing that will get in the road of the what its to be used for at the moment.
 
Window Features:

  * Basic controls Resize, Drag, click to front,

  * Windows have prioritys,  Windows are grouped and drawn based on their priority

  * Optional palette(s)

  * Optional window gadgets (minimized, maximize and close)

  * Mouse over highlights

  * Event Driven
   ---> User can catch  MouseOver,MouseClick, resize, redraw, create, delete, etc
   ---> Windows can control their own refresh rate  (either delta time a FPS rate)
   ---> System events and be over written, So you can make your own control functions to over ride

  * Windows are linkable.  (hit the space bar in the demo to LINK the clock and the Stars windows to the Borderless window - note Minimized will NOT work in this context...)

  * TaskBar for minimized windows.   User can catch events on Task bar.  Currently their can only be one task bar active at once.  


 There's still a few issues In the demo,  link minimizing a child window..  and maximize should pop exclusively to the front.  I've left the task bar to drag also,  it'll auto reposition it's self when it generates an update event.  TO show it's still a window





 Download Flexi Gui Demo V0.13 (750k) (login required)


Jeku

That is awesome!  I like how the resizing works... good job!  Would love to see the source :)

Was it written entirely in PB or did you have to make low-level modifications?
**
Automaton Games - Home of WordTrix 2.0, WordZap, and GameBasic
Jeku's Music - Easy listening electronic...
**

kevin

Nah, It's entirely PB1.062 (which has some bug fixes over release 1.06) but certainly nothing special about it.

kevin

#21
Flexi V0.16

 This in the continuation of PB's Flexi GUI library.  Previous the library didn't support any gadgets, so the purpose of this (quick) update is to introduce some basic gadgets ASAP.  

  So far i've only implemented a LABEL gadget.  Gadgets are linked to their parent window.  At this point their limited to being attached to windows, which is really though my own laziness.  While it would be  possible to link and sub link gadgets/windows, considering the style of gadgets that are going to be implemented, but it doesn't seem practical at this point.    

 Gadgets like windows generate events.  The user trap theses in the same approach, that being processing the event que.  There two type of basic events, user and system events. While you can manually trap and process System events if you like, obviously there best left to the library to maintain.   User events refer to everything from stuff like  MoveOver, Mouse Click, Window Open/CLose/resize/Drag etc etc

 In terms of Gadgets all I really need for my current project are  Labels,  Images and Sliders.   But i'll prolly add Text Boxes, Buttons also.  The performance of the library is veyr good, it's cache based, so the refresh load is spread more evenly.


The shot bellow shows a bunch of running windows mainly (from the old tech demo).  From double buffered windows, fixed refresh windows like the stars/clock through to image backdrops with some simple label attachments.

kevin

It's Funny What You Find

  While testing the library earlier I'd noticed sometimes windows would vanish while pressing the space bar.  Well at least that's what I thought.  In fact, the main loop code was set up make those windows become children of the borderless window.    Which is what you can see in the picture.  It's rather bizarre and something i'd completely forgotten about.    You can try it yourself, load the existing Flexi example in projects/function_library folder

  Gadget wise the basic Command Buttons are in, need some cosmetics though

kevin

Scroll Bars


 Here's the scroll bar prototypes  (only vscroll so far)

kevin

Check box, Vscroll + HScroll   Gadgets

kevin

#25
Scroll Bars Implemented

   Been toying with implementing scrolling bars into the library.   They were causing a few headaches initially, but it's mostly worked out now.  At this point there fully functional apart from user dragging.  But the hover and clicking (small + large) steps are up and running.  

   Had some  logic drama's with working out a way to size to the handle, but it now seems capable of representing the gadgets range correctly without the handle virtually disappearing :).

BlinkOk

#26
looks cool. are you going to do combo boxes and list boxes?

kevin

Not if i can help it.  ATM, I just need to get it a useful point for Play Mapper.  Can always come back later.

BlinkOk

are you going to release this for general use or is it just going to be part of play mapper?

kevin

Yeap,  for example an older version can be found in your PB/projects/function_libraries folder now.  

Prolly should make it into a Slib though, which would make using it bit simpler.