Basic window stuff in a C++ class: What are gotchas of this? SOS with 1 bug please...
- From: Chris Seberino <seberino spawar navy mil>
- To: gtk-list gnome org
- Subject: Basic window stuff in a C++ class: What are gotchas of this? SOS with 1 bug please...
- Date: Wed, 23 Jan 2002 22:50:38 -0800
I thought I was being smart by putting basic window
making stuff in a class. It works often but problems
with gtk_input_add....
Here is my home grown "Window" class... (w/o comments)
//---------------------------------------------------------
#include "Window.h"
GtkWidget* Window::createWindow(gchar* title, GtkWindowPosition position,
gint width, gint height) {
GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), title);
gtk_window_set_position(GTK_WINDOW(window), position);
gtk_window_set_default_size(GTK_WINDOW(window), width, height);
gtk_signal_connect(GTK_OBJECT(window), "destroy",
GTK_SIGNAL_FUNC(Window::endProgram), NULL);
gtk_widget_show(window);
return window;
};
void Window::endProgram(GtkWidget* window, gpointer eventString) {
gtk_main_quit();
};
//---------------------------------------------------------
--
WITH this C++ class, window
stuff like buttons and scrollbars would NOT show up
if I used gtk_input_add?!?!?
WITHOUT this C++ class, buttons and scrollbars WOULD appear
if I used gtk_input_add!?!?!
Any help would be greatly appreciated.
Sincerely,
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]