Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » FrameAddSize(Size& sz) really needed?
Re: FrameAddSize(Size& sz) really needed? [message #3680 is a reply to message #3655] Mon, 12 June 2006 17:20 Go to previous messageGo to previous message
Werner is currently offline  Werner
Messages: 234
Registered: May 2006
Location: Cologne / Germany
Experienced Member
Werner wrote on Sun, 11 June 2006 22:52

luzr wrote on Sun, 11 June 2006 21:07

Is is required because sometimes you need to get the Size of Ctrl based on its view size.

(If you want to know when, try FindInFiles in uppsrc Wink

Mirek


Well, I once again tried FindInFiles (Indeed, I already did it before posting Rolling Eyes .) I learned that you always use FrameLayout in combination with FrameAddSize. And in principle I recognize that "sometimes you need to get the Size of Ctrl based on its view size". But I still can't figure out in which cases you do need it. As far as I grasp I should look for a piece of code querying the size of the control. But I don't understand which precise expression to look for Embarassed .

So I don't know if I need FrameAddSize for my own frames. But of course I can write "FrameAddSize(Size& sz) {}" and just observe what happens Very Happy .

Werner



Just if somebody read this thread and might be interested in the answers ...

I fiddled about with some frames and I hope to have found the answers. Here they are (If something is wrong I would be happy to get corrected!):


1.
In which case is FrameAddSize(Size& sz) called by Ultimate++'s framework?

Never.

2.
Do I need to call it myself? If so: When?

Not normally. Only if I need to get the size of a ctrl based on the size of its view. So far I couldn't find an example where this is the case.

3.
Does it make sense to define and use FrameLayout(Rect& r) without semantically defining FrameAddSize(Size& sz)?

Yes, see the answer to question #2. But in any case in my own frame class for syntactical reasons I need to define the FrameAddSize function even if it's empty.

4.
Does it make sense to define and use FrameAddSize(Size& sz) without semantically defining FrameLayout(Rect& r)?

Maybe. But I doubt it very much. In any case I can't imagine a useful example.


All this sounds quite obvious. Laughing So, why did I ask these silly questions? Embarassed

I studied the article "About Frames" in "Browse topics" where FrameAddSize is semantically defined in 2 cases. And I still wonder what is the need for this ... Rolling Eyes

Werner
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to set the Constructor of a derived widget class?
Next Topic: OpenGL, SDL
Goto Forum:
  


Current Time: Fri Jul 18 10:53:12 CEST 2025

Total time taken to generate the page: 0.04260 seconds