Re: [UFO-devel] Better position management using ufo/glut
Status: Beta
Brought to you by:
schmidtjf
From: Elie `w. B. <dro...@gm...> - 2006-03-03 23:58:52
|
Hi ! Thanks for the quick answer. Here are the results of my attempts that considered your first answers. I think I didn't quite get some points. Here they are: > If you set the layout manager to a NULL pointer [UWidget::setLayout(NULL)= ], > the child widgets will be position relatively to its parent. I assumed that the positionning you are referring to is the one accessed UWidget::setLocation(int x, int y) (or UWidget::setBounds for this matter). I tried to apply the NULL layout to my root pane (myContext->getRootPane()->setLayout(NULL)), giving arbitrary coordinates like (42, 42) to my widgets. I doesn't really works as expected, since the widgets simply disappear. Could you give me a bit more information on the (x,y) coordinate system you are using (if I'm to trust the docs, (0,0) is top left of the screen), or perhaps I'm missing some call to get that custom positonning ? > > I'm looking for a way to get some colors inside the TextEdit > > component, for "syntax highlighting" purposes. > I'm sorry, this is on the ToDo-list, but there are more important things = on > it, too ... I'd be glad to contribute some code if you can provide me some directions as to "where" to update the code. I assume it could inherit from UTextEdit class since it could share many properties. Beside the syntax analysis, perhaps could you provide some hint on "how" to apply colors to parts of the text. I looked a bit at the font rendered (both basic and ogl) without seeing anything related to color, but I know from screenshots (alas) that it's possible - but I'm very reluctant into using CSS styles to apply the colors (could be heavy for syntax highlighting). Despite looking at the code (I have no IDE but emacs, grep, less and a shell - so no "nice" method tree ...), I still don't get to the part where the widgets are actually *drawn* (UWidget::repaint() .. UGraphics::? ... ?), and where I could specify the colors. > Well, actually, here comes some new questions, so I use your quotes to ac= t as > separators > Regarding widgets, do you think I could make some use of glTranslateX functions in some way or another to provide something a bit more "dynamic" or "animated" ? If it's possible, where are the available entry points to the widget drawing code (without having to mess with UFO code) Thanks again, -- Elie `woe` BLETON http://www.lwo-lab.net EPITA - B2 2009 - http://www.epita.fr |