forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Graphic area (%gr) and "window" inside

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Felin



Joined: 29 Jul 2009
Posts: 7
Location: Erlangen, Germany

PostPosted: Wed Jul 29, 2009 1:34 pm    Post subject: Graphic area (%gr) and "window" inside Reply with quote

Is it possible to have another "window" inside a graphic area created by "%gr", at the bottom right part of the graphic area? In this window (or can it perhaps also be a graphic area?) should some text be displayed and it should contain a scrollbar in case there's too many text which should be displayed.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Jul 30, 2009 8:42 am    Post subject: Reply with quote

You can do most things like this but it does not come naturally using ClearWin+. You would need to create the right kind of control somewhere else and then move it on top of the %gr region.

I could give you general hints on what to do but the details of the task are beyond the design of ClearWin+ and beyond my normal input into the forum.

As I have mentioned elsewhere, I would probably have to end up coding this for you.
Back to top
View user's profile Send private message AIM Address
Felin



Joined: 29 Jul 2009
Posts: 7
Location: Erlangen, Germany

PostPosted: Thu Jul 30, 2009 9:06 am    Post subject: Reply with quote

OK, thank you anyway, but I think I have to try myself. I'm not supposed to send the whole code, especially as there are some parts which shouldn't go out of the company.

I will just try my very best and if I don't manage, then I don't. And if I say that there's no easy way, then my tutors will accept.
Back to top
View user's profile Send private message Visit poster's website
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Jul 30, 2009 1:14 pm    Post subject: Reply with quote

If you only need graphics areas and not menu controls, you can manage your own "window" areas in a single %gr window, by just drawing them. I use a porthole feature, where I only update a small part of the screen as I move the mouse over the main screen.
There is also the ability to have tabs, and I think some of them can be %gr. I have seen this mentioned in the forum, bit I havn't used this feature. Someone else may have an idea.

Good luck

John
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Jul 31, 2009 7:49 pm    Post subject: Reply with quote

The simple answer is that there isn't a simple answer! But in principle, what you are asking for can be done using the subroutines CREATE_GRAPHICS_REGION@ and COPY_GRAPHICS_REGION@. There's nothing to stop you simply drawing in an area of the background %gr, but then you'll need to manage any "crop to fit".

I suggest creating two graphics regions of the size and shape you want to put on top. Save the contents of the underlying %gr graphics region to one of them. Draw what you want to appear in that space in the other, and simply copy it across when it is ready. Restoring the original window contents is a question of replacing the saved contents in the right place.

You may need to contemplate what needs to be done if the window is resized (probably best to make it not resizable!) and how to find mouse coordinates in the insert (not difficult) if you want to interact with it.

If what you want to appear in your insert is "pre-drawn", then you can use one of the IMPORT_IMAGE@, IMPORT_PCX@ or IMPORT_BMP@ routines to import a resource.

Possibly, if you really do want a scrollable block of text, then you should contemplate using a %cw control UNDERNEATH your %gr region. There's nothing to stop you simply closing a window that has only a %gr and drawing one in its place that has a %gr AND a %cw - and reverting to a window that has just a %gr at some later time.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group