New release 1.12 - lots of eye candy

You’ll like this one, I think, although it’ll probably break some of your code! Lots of new buttons and widgets. And I’ve not just done vertical sliders - I’ve thrown in rotary ones too! Check out the demo app to see some of it in action.

Here’s the change list:

  • fixes to OpenGLComponent to make it work when parent components are moved
  • added a flag to allow building of non-GUI apps under linux where UI libraries aren’t present
  • popup menus can now be positioned to align with a button or other component
  • created some static initialiseJuce() functions in juce_Initialisation.h, to make it easy to embed juce in command-line apps or apps that use their own event-loop.
  • new class: GroupComponent for drawing a line around a group of components
  • new sliders! Completely revamped the Slider class so that it can now do vertical and rotary sliders, as well as allowing user-defined scaling and snapping.
  • updated the Mac projects for XCode 2.1 and fixed the GCC4 problems. Apple have just changed the project format for this release, so if you’re still on XCode 2.0, then sorry, you’ll need to upgrade to build this release.
  • a couple of changes to Path to clean up the elliptic-arc and pie-shape drawing methods
  • added a Path::addStar() method for drawing star shapes and addBubble() for drawing speech bubble shapes
  • new class: ComponentDragger to easily add logic for dragging components around
  • new class: ResizableBorderComponent for adding windows-style resizable edges to components
  • name change: ResizerComponent is now called ResizableCornerComponent to complement ResizableBorderComponent
  • new class: ResizableWindow to make it easy to create top-level windows that are resizable/maximisable, and to make it easy to save/restore their position and state. DialogWindow has also now been changed to use this as its base class.
  • renamed method: UndoManager::clear() becomes UndoManager::clearUndoHistory() (just to disambiguate when subclasses are used)
  • Component::setInterceptsMouseClicks() can now optionally intercept clicks on child components
  • fixed a bug in Array::move
  • new set of classes: Drawables - these are used to build up a tree of graphic elements that can be drawn, forming a complex image. So far there are coloured shapes, images and text, but there may be more to add in future. They also have a persistence mechanism so can be saved/loaded and used as a vector graphics format. Although the classes are quite basic at the moment, I might expand these one day to form a way of rendering SVG.
  • changes to Buttons - moved all the toggle-button logic into the base class so that all buttons can now have an on/off state and belong to button groups. TextButtons and DrawableButtons use this to draw themselves in an on/off state, and the old ToggleButton class is still there for a tickbox-style toggle button.
  • new button type: DrawableButton which takes some Drawables as its image and has a few different styles. This button will ultimately take over from ImageButton and ShapeButton.
  • moved isEnabled()/setEnabled() into the Component base class, so that it now applies hierarchically. (previously the different widgets all had their own separate enablement methods)
  • fixes and tweaks to the windowing system on Linux to hopefully make it run more happily on Gnome

Heh, well there goes a bit of code. Thank you. :smiley:


:shock: :shock:

:shock: :shock: :shock:

brilliant - that’s a meaty update and no mistake! well done and thank you :slight_smile:

looks great!

Um… That sounds great, but I’m having problems on linux (again, sorry :oops:). I’ve just been trying to build the demo app, but the first thing I noticed is that the drawables folder isn’t in the premake .lua file for .cpp files, meaning that the demo will give linking errors. Then, when I put the folder in, it builds, but when trying to run it, it quits immediately with the error: ‘Trace/Breakpoint Trap’. I’m trying this at uni (debian again), but I means I’ll have to wait till I go home for lunch before I can see the new LookAndFeel :(, on Windows.

  • Niall.

ah shit… I forgot to merge my linux changes in before I zipped it up. Damn damn damn damn, I’ll update it shortly…

ok, I’ve added the files I missed out before - try downloading again now…

Yeah, that’s working now :). The ‘Trace/breakpoint trap’ error I was getting was because I’d compiled a debug build, and it was getting caught at the jassert warning about windows being added to the desktop with a size < 1.

The new look and feel is very nice - I can’t wait to add it to my pedal board program, it’ll go very well with the milky skin :D.

  • Niall.

[quote]Yeah, that’s working now Smile. The ‘Trace/breakpoint trap’ error I was getting was because I’d compiled a debug build, and it was getting caught at the jassert warning about windows being added to the desktop with a size < 1.

Ah yes, I also removed that assertion yesterday, but clearly forgot to merge that change into the build as well… You can safely hack it out if it gets in your way.

Glad you like the l+f - there’ll be more UI goodies to come soon. Tabbed components and progress bars next, I think…

I wanted to try and take a peek at it but i’m unable to make a build
i get an error that i’m missing

fatal error C1083: Cannot open include file: ‘QTML.h’: No such file or directory

what is that and where do i find it?

in winxp

It’s quicktime - you can comment out the line in juce_Config.h and build without it…

for what it’s worth, i tried adding:

	void mouseUp (const MouseEvent& e)

to the DemoOpenGLCanvas class.

when you release your drag, the canvas goes to the desktop and quits repainting.

Since I don’t have quicktime or opengl installed for my juce stuff, I uncomment both things in the juce_config. I also have to goto the platform specific configurations and comment out the SSE define as well, for some reason it just will not compile that assembler using it, have not yet figured that out…

Hmm… I just got round to compiling my pedal board with v1.12. It’s not that I don’t like some of the changes you’ve made, but did you have to remove the ability to alter the colour of the TextButton’s text? That kind of messes up the look of most of my skins. What it used to look like:

Black text on those buttons does not look right (particularly the milky skin)… Looks like I’m going to have to subclass TextButton, and also add a couple of methods to my LookAndFeel class to deal with the resizer’s colour (and the button’s background, to a lesser extent).

[edit]Okay, so this post is really just me whining about changes to things that probably won’t affect anyone else, but I do think it’s useful to be able to set the colour of a TextButton’s text, even if it’s just part of a LookAndFeel method.[/edit]

  • Niall.

Well the long-term plan is to move over to using DrawableButtons with whatever coloured objects/text/images you need. It’s quite easy to set up a DrawableButton if you need specifically-coloured text.

Or just do a look and feel class, if you need really specific stuff.

Ah, I see. I need to look at the Drawable classes more closely, I think - their xml capabilities are particularly interesting. I wonder if I could use them to give the user control over how the app is drawn, at an even more fundamental level…

  • Niall.

oh, I forgot to mention in the release notes that I’ve not actually implemented the drawable xml methods yet!

Need to have a bit of a think about the best plan for that.

Ah well… I’m looking forward to it though - the idea of updating my pedal board so the user can skin it using vector graphics is pretty exciting :).

  • Niall.