u-noob-tu
April 1st, 2011, 03:59 PM
Hey all,
i think im pretty close to designing my first graphical program, but im confused about what libraries to use to make it. i have the "Devhelp" documentation program, which is a little confusing, and im not sure if i should be including headers for GTK+ or GTKMM. i thought i read that GTKMM is for C++, but im not 100% sure thats right. plus, im having trouble with classes and the layering of the widgets of each window. i cant seem to find a clear guide on how things are supposed to be ordered. if anyone wants to take a look at my source code and give me some pointers, ill put it up for you to look at. it will be very appreciated.
thanks all. :)
#include <iostream>
#include <string>
#include <gtk/gtk.h>
#ifndef _WINDOW_H_
#define _WINDOW_H_
using namespace std;
class Gtk::Window
{
public:
virtual Gtk::Window::~Window();
virtual bool verify() const = 0;
virtual void doit();
const char *id() const;
void doVerify();
protected:
virtual double whatName() = 0;
};
#endif // _WINDOW_H_
int main()
{
string name;
string password;
cout << "Please enter your name";
cin >> name;
cout << "Please enter your password";
cin >> password;
if ((name == "Ryan") && (password == "password"))
{
cout << "Welcome, Ryan. What do you want to do first?" << endl;
}
cout << "Press ENTER to continue" << endl;
cin.get();
return 0;
}
i think im pretty close to designing my first graphical program, but im confused about what libraries to use to make it. i have the "Devhelp" documentation program, which is a little confusing, and im not sure if i should be including headers for GTK+ or GTKMM. i thought i read that GTKMM is for C++, but im not 100% sure thats right. plus, im having trouble with classes and the layering of the widgets of each window. i cant seem to find a clear guide on how things are supposed to be ordered. if anyone wants to take a look at my source code and give me some pointers, ill put it up for you to look at. it will be very appreciated.
thanks all. :)
#include <iostream>
#include <string>
#include <gtk/gtk.h>
#ifndef _WINDOW_H_
#define _WINDOW_H_
using namespace std;
class Gtk::Window
{
public:
virtual Gtk::Window::~Window();
virtual bool verify() const = 0;
virtual void doit();
const char *id() const;
void doVerify();
protected:
virtual double whatName() = 0;
};
#endif // _WINDOW_H_
int main()
{
string name;
string password;
cout << "Please enter your name";
cin >> name;
cout << "Please enter your password";
cin >> password;
if ((name == "Ryan") && (password == "password"))
{
cout << "Welcome, Ryan. What do you want to do first?" << endl;
}
cout << "Press ENTER to continue" << endl;
cin.get();
return 0;
}