paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui/test event_bug.cpp,NONE,1.1.2.1 Makefile.am,1


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/test event_bug.cpp,NONE,1.1.2.1 Makefile.am,1.2.6.12,1.2.6.13 array.cpp,1.1.2.2,1.1.2.3
Date: Wed, 16 Apr 2003 04:59:01 -0400

Update of /cvsroot/paragui/paragui/test
In directory subversions:/tmp/cvs-serv26983

Modified Files:
      Tag: devel-1-0
        Makefile.am array.cpp 
Added Files:
      Tag: devel-1-0
        event_bug.cpp 
Log Message:
added event_bug sample



--- NEW FILE ---
#include <pgapplication.h>
#include <pgwindow.h>
#include <pglineedit.h>
#include <pgbutton.h>
#include <pgeventobject.h>

class MyDialog : public PG_Window, public PG_EventObject
{
    public:
        MyDialog();

        PARAGUI_CALLBACK(ok_clicked);

        PG_LineEdit* e;
        PG_Button* ok;
};

MyDialog::MyDialog()
    : PG_Window(0, PG_Rect(0, 0, 200, 200), "test", true)
{
            e = new PG_LineEdit(this, PG_Rect(0, 0, 200, 20));
            ok = new PG_Button(this, 0, PG_Rect(10, 100, 180, 20));

            ok->SetEventObject(MSG_BUTTONCLICK, this, 
(MSG_CALLBACK_OBJ)&MyDialog::ok_clicked);
}

PARAGUI_CALLBACK(MyDialog::ok_clicked)
{
    SendMessage(this, MSG_MODALQUIT, 0, 0);
}

int main(int argc, char** argv)
{
        PG_Application app;
        app.SetEmergencyQuit(true);
        
        if (!app.LoadTheme("default", true, "../dat"))
        {
        cerr << "Unable to load theme!" << endl;
        exit(-1);
        }
        
    app.SetFontSize(14);

        if (!app.InitScreen(300, 300, 16, 0))
        {
                cerr << "Couldn't initialize X Windowing System\n";
                exit(1);
        }

    if (1)
    {
        MyDialog md;
        md.Show();
        md.RunModal();
        //md.Hide();
    }

    app.Run();

    return 0;
}

Index: Makefile.am
===================================================================
RCS file: /cvsroot/paragui/paragui/test/Makefile.am,v
retrieving revision 1.2.6.12
retrieving revision 1.2.6.13
diff -C2 -r1.2.6.12 -r1.2.6.13
*** Makefile.am 14 Mar 2003 07:49:56 -0000      1.2.6.12
--- Makefile.am 16 Apr 2003 08:58:59 -0000      1.2.6.13
***************
*** 3,7 ****
  AUTOMAKE_OPTIONS = foreign
  
! noinst_PROGRAMS = array writefile stress1 stress2 listbox animation dropdown 
paratest dblbuffer navtest windowtest layouttest windowresize
  
  array_SOURCES = array.cpp
--- 3,10 ----
  AUTOMAKE_OPTIONS = foreign
  
! noinst_PROGRAMS = eventbug array writefile stress1 stress2 listbox animation 
dropdown paratest dblbuffer navtest windowtest layouttest windowresize
! 
! eventbug_SOURCES = event_bug.cpp
! eventbug_LDADD = -L../src $(PARAGUI_LIBS)
  
  array_SOURCES = array.cpp

Index: array.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/test/Attic/array.cpp,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** array.cpp   14 Mar 2003 07:52:03 -0000      1.1.2.2
--- array.cpp   16 Apr 2003 08:58:59 -0000      1.1.2.3
***************
*** 8,12 ****
  
        PG_ArrayWidget(PG_Widget* parent, const PG_Rect& r) : 
PG_ThemeWidget(parent, r) {
!               for(int i=0; i<10; i++) {
                        lines[i] = new PG_Label(this, PG_Rect(0,i*25,150,25), 
"line");
                }
--- 8,12 ----
  
        PG_ArrayWidget(PG_Widget* parent, const PG_Rect& r) : 
PG_ThemeWidget(parent, r) {
!               for(int i=0; i<50; i++) {
                        lines[i] = new PG_Label(this, PG_Rect(0,i*25,150,25), 
"line");
                }
***************
*** 14,18 ****
        
  protected:
!       PG_Label* lines[10];
  };
  
--- 14,18 ----
        
  protected:
!       PG_Label* lines[50];
  };
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]