Home » Community » Newbie corner » Removing .lay dependancy from a GUI app
Removing .lay dependancy from a GUI app [message #27852] |
Fri, 06 August 2010 19:50  |
cullam
Messages: 8 Registered: July 2010 Location: St. John's Canada
|
Promising Member |
|
|
Hi Guys.
I've been working on a small set of graphical apps. When I started building them, I used information from one of tutorials, and a template to get started. Basically, the class that contains most of my important functionality is declared like this:
"class VectorsGUI : public UUVBase, public WithVectorsGUILayout<TopWindow>"
I've been doing alot of my own work here, and I'm not using any of UPP's built in graphical widgits. I've started separating my VectorsGUI class into two classes: one that does the basic stuff that I intend to extend on in other applications, and one that does the specific stuff that I want for this application. But to do this, my life would be made a lot easier if I no longer relied on "public WithVectorsGUILayout<TopWindow>", since the class that will want to control the window (I think) will have a different name, and I'd rather not have to use elements that work entirely "under the hood". Aside from that, I'm not actually using the layout file for anything, other than my window size, which I'm going to be reading in from a .conf file in future anyway.
So, in theory, there should be little to this. My main looks like:
#include "VectorsGUI.h"
#define VERSION "2010070801"
#define FILE_BASE "SQX-Drive"
#define FILE_TITLE String( FILE_BASE )
GUI_APP_MAIN
{
VectorsGUI(FILE_TITLE, FILE_BASE, VERSION ).Run();
}
Is there a simple way to have my code just use TopWindow directly, without the auto-generated constructor? And is there something additional I have to do to still be able to use Paint() and GetX()/GetY()?
I'm sure this is fairly easy, but I just don't know enough about how this constructor works. Thanks!
-cullam
|
|
|
|
Re: Removing .lay dependancy from a GUI app [message #27894 is a reply to message #27880] |
Mon, 09 August 2010 15:39   |
cullam
Messages: 8 Registered: July 2010 Location: St. John's Canada
|
Promising Member |
|
|
Maybe I'm missing something here, but I've got the impression that the TopWindow class uses .lay files for it's initialization. When I've changed a class to inherit from TopWindow, I've got this error:
C:\upp2094\uppsrc\CtrlCore/TopWindow.h(239) : error C2665: 'InitLayout' : none of the 11 overloads could convert all the argument types
C:\upp2094\uppsrc\CtrlLib/Ctrl.lay(1): could be 'void Upp::InitLayout<T,T>(Upp::Ctrl &,L &,D &,Upp::EditStringLayout__layid &)'
with
[
T=GUIClass,
L=GUIClass,
D=GUIClass
]
Looking through it, it would seem that TopWindow is extended from Ctrl, which is looking for a layout file. So I've clearly missed something fundamental. I'm browsing around now, trying to squash it, but I might be going about that all wrong.
Sorry these questions are so basic, working with what I'm assuming is really simple, low level stuff for anyone with experience with this system. I guess I might just be better off to start a new project, not using the template, as that might have background effects that I'm not aware of.
-cullam
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:39:21 CEST 2025
Total time taken to generate the page: 0.00559 seconds
|