Splitted window

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

FranioBanio
Just popping in
Just popping in
Posts: 1
Joined: Fri Oct 17, 2008 10:54

Splitted window

Postby FranioBanio » Fri Oct 17, 2008 11:01

Is this possible to create window divided to 2 parts with splitter component, when aeach part can then be interactively resized by the user??? Does someone have some ideas ??

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Fri Oct 17, 2008 18:47

This is definitely possible. There are probably a few ways to accomplish this, if you are not familiar with the falagard system, this would probably work:

In the layout:
1) Create your parent FrameWindow that will contain the splitter windows
2) Add 2 child FrameWindow's, A (left-frame) and B (right-frame)
3) Disable user-resizing on frame B.

In the code:
1) When intiializing the parent frame, pass the handle for child-frame B to child-frame A
2) When initializing frame A, subscribe to it's resize event
3a) Inside frame A's resize event handler, only allow resizing of the right-border
3b) when frame A's right-border is resized, update the position of the left-border for frame B accordingly

I /imagine/ this could be substantially eaiser by defining a new widget in the .looknfeel file such that it has two child frame window's where the right-frame's left-position is dependent on the left-frames right-position; unfortunately I'm not familiar enough with the falagard syntax to produce such a component. Perhaps someone else can?


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 15 guests