paragui-users
[Top][All Lists]
Advanced

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

[paragui-users] PG_Richedit problems:


From: andy uehara
Subject: [paragui-users] PG_Richedit problems:
Date: Mon, 5 Aug 2002 23:16:52 -0700 (PDT)

I use paragui 1.0.2, SDL1.2.3  and debian testing
here's a cut and paste of some code of the problem.
it's the smallest example I could cook up. 
I see two problems: 
1st: When you PGRE.setText before the widget gets
shown it does some funky stuff
2nd: When you load text with a space at the end it
repeats the last word.

I am going to start working on this problem today, so
hopefully I'll have a patch sometime soon.
andy
ps. I noticed when debian upgraded recently that the
default font shows up as a bunch of empty boxes. any
ideas?

#include "paragui.h"
#include "pgrichedit.h"
#include "pgdropdown.h"

PARAGUI_CALLBACK(exit_handler) {
    PG_Application* app = (PG_Application*)
clientdata;
    app->Quit();
    return true;
}
PARAGUI_CALLBACK(re_handler){
  PG_RichEdit* re=(PG_RichEdit*) clientdata;
  re->SetText("motion looks like your are grabbing the
rim of a hat and following it to the edge. ");
  return true;
}

//PARAGUI_CALLBACK

int main(int argc, char* argv[]) {
    PG_Application app;

    app.LoadTheme("simple");
    app.InitScreen(240, 320, 16, SDL_SWSURFACE);
    app.SetCaption("Testing PG_RichEdit" ,NULL);

    PG_RichEdit
redit(NULL,PG_Rect(0,260,240,60),false,220,30,10,"WidgetList");
    redit.SetText("This is where notes will appear");
    redit.Show();
    redit.SetText("motion looks like you're pulling
something from your stomach to the side");

    PG_Button myButton(NULL,1, PG_Rect(180, 0, 60,
20), "Quit");
    myButton.SetEventCallback(MSG_BUTTONCLICK,
exit_handler, &app);
    myButton.Show();

    PG_Button myButton2(NULL,2, PG_Rect(0,40,240,20),
"add to RichEdit");
   
myButton2.SetEventCallback(MSG_BUTTONCLICK,re_handler,&redit);
    myButton2.Show();

    app.Run();
    return 0;
}


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



reply via email to

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