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 » Community » Newbie corner » example SetLayout question
example SetLayout question [message #37675] Thu, 01 November 2012 12:41 Go to next message
nmg01 is currently offline  nmg01
Messages: 1
Registered: November 2012
Location: Bucharest
Junior Member
Hello guys.

I am the absolute U++ begginer and i'm trying to understand some things. I used only MFC previously and U++ is totaly new for me.
I need to figure out some basic things.

For example, in SetLayout sample:

#include <CtrlLib/CtrlLib.h>
 
using namespace Upp;
 
#define LAYOUTFILE <SetLayout/SetLayout.lay>
#include <CtrlCore/lay.h>
 
class MyApp : public WithLayout1<TopWindow> {
public:
    void Layout1()   { [b]SetLayout_Layout1(*this)[/b]; }
    void Layout2()   { [b]SetLayout_Layout2(*this)[/b]; }
 
    typedef MyApp CLASSNAME;
 
    MyApp()
    {
        CtrlLayout(*this, "Window title");
        layout1 <<= THISBACK(Layout1);
        layout2 <<= THISBACK(Layout2);
    }
};

GUI_APP_MAIN
{
    MyApp().Run();
}


Where does the two functions SetLayout_Layout1() and SetLayout_Layout2() came from ? I suspect they are members of some class, but which one ?
Re: example SetLayout question [message #37678 is a reply to message #37675] Thu, 01 November 2012 14:02 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi nmg01,

Welcome to U++ Cool

These are global template functions automatically generated from the .lay file. They are always called "SetLayout_" + <actual layout name>, see CtrlCore/lay.h if you are interested in the dirty details Wink

Best regards,
Honza
Previous Topic: Recent Problem with all u++ apps on Ubuntu 12.04
Next Topic: What type are the tabs?
Goto Forum:
  


Current Time: Sat May 04 15:14:55 CEST 2024

Total time taken to generate the page: 0.02103 seconds