Wiki > Main > WpsEditor (compare)
Difference: WpsEditor (r10 vs. r9)
This Page is about the new upcoming WPS / Theme editor, which is developed as a gsoc2008 project for rockbox.
This application will allow users to preview, create and edit existing WPS's and themes for Rockbox.
The main aim is - create a GUI application with redefined drawing functions that uses Rockbox' drawing mechanism (second variant).
WPS preview is done.
Co - Mentor: NicolasPennequin
This variant is fully based on rockbox code. Yes! As I see now we can use functions described in gwps-common.h. How? We can redefine struct screen *display; in gui_wps. If I�m right only display is charged with direct drawing to the screen. It calls functions from lcd.h to draw received data. So we can assign functions to draw in our application. If it can be used as a standalone library we will have already made display mechanism. I think it can be done, same as checkwps. If so, I�ll only need to create drawing functions. But there will be needed lots of callbacks which will not be included in the dll. So which of them is another research, I haven�t done yet. Any advices here?
display is used in: gui_splash gui_bitmap_scrollbar_draw gui_scrollbar_draw ab_draw_markers cue_draw_markers draw_albumart peak_meter_screen write_line
so, this functions surely use some other;
stop_scroll getymargin get_ foreground get_background clear_display getfont getwidth set_drawmode fillrect mono_bitmap_part transparent_bitmap_part define_pattern setmargins getstringsize getxmargin puts_scroll putsxy get_locked_pattern set_viewport clear_viewport getheight update
gwps is used in: draw_albumart
So if all of this could be reimplemented or used independently, i think we can use gui_wps, and we will have exact mechanism of displaying. Something tells me that it is not full list of functions to be reimplemented.
Basic mechanism for editing: User clicks left mouse button, editor detects it. Now we have a GUI that know coordinates on the wps. So, we know child viewport. And can show WPS calculate the line clicked in dynamic i.e. one that viewport. If we know line - we can change artist, track, album to see how it would be look like with long names, one take all needed tokens from wps_data structure, and display some basic representation of native rockbox tokens. Than user can change volume, track progress edit line. After that we take oroginal text representation of the wps, and font height. Scroll engine is not implemented yet. replace edited and orriginal line in our viewport.
Main bug: rockbox code clears some viewports after images and text are drawn. How should be drawmodes applied?
Next to do: implement core editing for images, and base text tags
The code could be found here http://code.google.com/p/wpseditor/ .
r12 - 13 Aug 2008 - 15:08:15 - MaurusCuelenaereRevision r10 - 13 Aug 2008 - 13:27 - RostislavChekan
Revision r9 - 09 Jul 2008 - 11:20 - RostislavChekan
Copyright © by the contributing authors.