summaryrefslogtreecommitdiff
path: root/apps/gui/list.h
AgeCommit message (Collapse)Author
2020-11-14synclist add method for setting selection colorWilliam Wilgus
Change-Id: I8c8761d92f4fc99f65d45098ee6e97800d3fe002
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2019-07-28Show time, date, and recording directory in the info screenSolomon Peachy
Patch by Igor Poretsky Change-Id: I5db0d018742c11dd9bf3ca4c9539cd91f94d4c2e
2015-10-07iPod Classic: reads HDD S.M.A.R.T. dataCástor Muñoz
Adds ata_read_smart() function to storage ATA driver, current SMART data can be displayed and optionally written to hard disk using System->Debug menu. Change-Id: Ie8817bb311d5d956df2f0fbfaf554e2d53e89a93
2014-01-07lists: Adapt put_line().Thomas Martitz
This enables removing large portions of code, simplifiyng the drawing routine. All of the removed code is functionaltiy now available through put_line(). Change-Id: Ib8e61772134189a8c3c6d22345c0b45e912bea76
2013-02-12simplelist: Make better use of the static buffer and simplify APIJonathan Gordon
Change-Id: I1327fcd01d6f817be6c7018d30d33446c9b57287
2012-06-19Make touchscreen handling work with skinned lists.Frank Gevaerts
Change-Id: I7df93319c8f16f05e840d74b022aab4803bb8f80
2012-02-25Add %LR and %LC to get at the current row and columm in skinned lists.Frank Gevaerts
This allows list items to be rendered differently depending on their on-screen position, allowing things like gradients or nonlinear alignment Change-Id: I1d9c080f97e83707f0e80f57abc762cb2b94f6ed
2012-02-22Store listitem_viewport_cfg->label as skinoffset instead of raw pointerFrank Gevaerts
This fixes the case where some blocks got relocated and the skin render code couldn't find the matching viewports any more. Change-Id: I4394444fb139ee5bc986f374dba82a104013e354 Reviewed-on: http://gerrit.rockbox.org/112 Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2012-01-12keyclick: Add a callback so screens can cancel a click. Add a generic list ↵Jonathan Gordon
callback to stop clicks when we are at the end of the list Change-Id: Iabb44a861dd7506cd883c1bdb0241303fa646746
2011-12-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-10-22Fix buttonbar and line padding in time&date screen.Thomas Martitz
The time&date screen uses a custom parent for do_menu(), and doesn't account for the buttonbar and list line height. Introduce gui_synclist_set_viewport_defaults() to set those for viewports that are going to be list parents and use that so that time&date screen doesn't need to know about buttonbar/line padding. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30824 a1c6a512-1295-4272-9138-f99709370657
2011-10-07lists: Detect dirtyness (need to reinit) for each list, instead of once ↵Thomas Martitz
globally. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30721 a1c6a512-1295-4272-9138-f99709370657
2011-09-18Add "%LN" tag to retrieve the list item number of the current item. This ↵Frank Gevaerts
allows e.g. putting item numbers in skinned lists. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30568 a1c6a512-1295-4272-9138-f99709370657
2011-09-11Rework how the skin gets the list item text to save some ram. Also allow the ↵Jonathan Gordon
%LI and %LT tags to take 2 optional parameters to get a different items text/icon: %LT(offset, nowrap) - get the text for the "being drawn"+offset item (offset being + or -). if the second param is "nowrap" (Without quotes) the text will be blank if the item would need to wrap. Same for the icon e.g: %LT(-1) %LT << %LT(1, nowrap) will display: Four Five << Six (or nothing if Five is the last item) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30502 a1c6a512-1295-4272-9138-f99709370657
2011-09-06Lists can now be completly draw using the skin engine!Jonathan Gordon
due to lack of user feedback the actual tags may change, hopefully not though. The way it works is the skin specifies a rectangle and a viewport label. For each item in the list that is being displayed all viewports with the specified label are drawn. However, instead of the viewport x/y position being offset from the top left corner like normal they are offset from the rectangle position in the list (so think of them as child-viewports of the rectangle which moves). Normally the rectangle will move down the screen to show a normal list, this can be changed to move across the screen in a grid pattern. The UI viewport is used to bound the items (i.e %Vi() ) Scrolling is completly disabled in all items except the currently selected item. This works well in combination with the %cs tag to show differently styled lists based on the current screen :) New tags: %LT - Get the current items text %LI - Get the current items icon number %Lc - Use as a conditional to determine if the current item is the selected item %LB - BAR TAG to show the scroll bar, params/options like other bar types. It still needs a bit of work though. Use as a conditional to find out if the bar is actually needed %Lb(viewport, width, height [,tile]) - specify the viewport label to draw for each item and the size of each item. if the last param is 'tile' it will form a grid instead of a list example.sbs: %?cs<%Lb(a,100,20)|> %V(0,0,10,-,1)%Vf(aabbcc) %?LB<%LB(0,0,10,185, invert)> %Vi(-,10,0,-,-35,1) %Vl(a,5,5,160,12,1) %s%?Lc<%Vg(00ffaa, ff0000, 000000)%Vs(gradient)%>%>%>%ac>zzzzzzz %LT zzzzz%s%?Lc<%ar%<%<%<> %V(0,185,-,-,1) %s%LT git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30461 a1c6a512-1295-4272-9138-f99709370657
2011-09-03Add the list colour callback and a proper title icon to the simplelist apiJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30419 a1c6a512-1295-4272-9138-f99709370657
2010-10-31FS#11686 - Kinetic list scrolling for touchscreenThomas Martitz
This adds kinetic scrolling to to lists on touchscreen targets and RaaA, like all other OSes on touchscreens have. It's only enabled in the absolute point mode, so for non-touchscreen and in grid mode nothing changes. Kinetic scrolling means that the list keeps scrolling (but is decelerating) after you leave the touchscreen with the finger. Redraw interval and deceleration is hardcoded for now but could be made configurable if desired. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28408 a1c6a512-1295-4272-9138-f99709370657
2010-09-23Don't actually reimplement an existing feature for hiding the selection markerThomas Martitz
during scrolling. However, the existing one is part of the list api, so it shouldn't be overridden blindly internally, so do the decision in a different but equivalent way. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28147 a1c6a512-1295-4272-9138-f99709370657
2010-09-23Touchscreen: Improve scrolling in absolute point mode.Thomas Martitz
* Scrolling is now done by wiping over the screen. There's no acceleration or kinetic scrolling yet though. But it works rather well (previously you held the edges of the list to scroll). * Improve scrollbar scrolling so that it keeps scrolling even if you leave the scrollbar area. * Hide selection during scrolling * Prevent accidental hitting of the list title (which means go back) during scrolling * Don't go into context menu after scrolling when leaving the screen on an item In general, it's very much like scrolling in native lists in Android, except there's no kinetic scrolling and everything is still line based, but with the feature that the scrollbar enables jumping around in the list and very fast scrolling. Thanks to Dustin Skoracki for his ideas and half of the code for this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28145 a1c6a512-1295-4272-9138-f99709370657
2010-02-21remove unused fields from struct gui_synclist.Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24807 a1c6a512-1295-4272-9138-f99709370657
2010-02-16* surround member only used by charcells with #ifdef HAVE_LCD_CHARCELLS in ↵Teruaki Kawashima
struct scrollinfo in scroll_engine.h. * remove function prototypes which are not actualy defined. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24693 a1c6a512-1295-4272-9138-f99709370657
2010-02-11fix text scrolling handling in do_menu, set_time_screen and time_screen.Teruaki Kawashima
Don't scroll text in time_screen(). the lines will be redrawn before scrolling statrs, so they don't scroll anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24591 a1c6a512-1295-4272-9138-f99709370657
2010-01-05Use plain int (instead of char) for field selection_size in struct ↵Bertrik Sikken
simplelist_info git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24188 a1c6a512-1295-4272-9138-f99709370657
2009-10-11revert r23093 and r 23094, since the title pointer is used to modify the ↵Nils Wallménius
title of the list from the callback function in one place git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23096 a1c6a512-1295-4272-9138-f99709370657
2009-10-11Const correctnessNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23093 a1c6a512-1295-4272-9138-f99709370657
2009-09-07Fix buttonbar handling/theme changed handling in lists.Thomas Martitz
The lists need to copy to a local parent if a list passes NULL as parent in the init. This was before the commit of custom ui vp, but I removed it since I (wrongly) thought using the ui vp as parent would be fine. Let the viewportmanager fire a event in case when a theme-related setting changed and simply the handling in the lists code. However the buttonbar handling didn't work before anyway, since list code didn't know if the buttonbar was active (it asked a variable which was always false....). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22651 a1c6a512-1295-4272-9138-f99709370657
2009-08-20Make the formatter functions used by the settings return a pointer to avoid ↵Nils Wallménius
usless copying of lang strings, this brought with it a long chain of const correctness and a few random cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22440 a1c6a512-1295-4272-9138-f99709370657
2009-08-17FS#10534: Make scrollbar width variable through a setting (useful for ↵Maurus Cuelenaere
touchscreen targets) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22387 a1c6a512-1295-4272-9138-f99709370657
2009-08-16User definable UI viewport, to be able to restrict the UI into a viewport ↵Thomas Martitz
for all bitmap displays. Flyspray: FS#8799 This will allow for pretty themes, for example those with nice glass effects on their backdrops (some might argue they're wasting screen space but it's upto them), as well as allowing for future background WPS updates in the main UI. Plugins are not converted yet, they simply use the full screen. Ideally, any plugin that does *not* want the UI viewport, should take care of that itself (i.e. plugins should normally use the UI viewport). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22365 a1c6a512-1295-4272-9138-f99709370657
2009-08-06Various files: make functions static if they're local or make sure there is ↵Bertrik Sikken
a proper #include if not git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22184 a1c6a512-1295-4272-9138-f99709370657
2009-08-02Remove redundant definitions of SCROLLBAR_WIDTHNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22114 a1c6a512-1295-4272-9138-f99709370657
2009-07-11Fix type mismatch warnings and errors exposed when building with EABI toolchain.Andrew Mahone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21769 a1c6a512-1295-4272-9138-f99709370657
2008-12-31Decouple the statusbar drawing from the rest of the screen drawing. it is ↵Jonathan Gordon
not drawn roughly 4x per second automatically. viewport_Set_defaults() will setup the given viewport with the correct "full screen" dimensions (so start at 0,0 if statusbars are disabled or 0,8 if they are enabled.) All screens should keep the statusbar enabled, but if you really want to ignore the user setting you can disbaled it with viewportmanager_set_statusbar(false). This commit also includes some menu/list viewport cleanups from kugel in FS#9603 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19622 a1c6a512-1295-4272-9138-f99709370657
2008-09-25redo the previous commit so its actually useful.Jonathan Gordon
if the callback returns ACTION_STD_CANCEL when the user presses ACTION_STD_OK the simple list will exit and set the selection. Otherwise, when ACTION_STD_CANCEL happens the selection will be set to -1 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18641 a1c6a512-1295-4272-9138-f99709370657
2008-09-25have the info lists set the selection before they are exited, this is ↵Jonathan Gordon
sometimes needed by the caller git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18640 a1c6a512-1295-4272-9138-f99709370657
2008-07-05fix FS#9144 hopefully for good... only update the screen if the time line is ↵Jonathan Gordon
selected, or if talking menus are disabled, only update if the time line is actually on the screen. Also only update every 5s so scrolling lines still scroll. (turns out scroll_all was broken! fixed now) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17944 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-04-09Pass the buffer length to the list_get_name callback functions instead of ↵Nils Wallménius
using hardcoded MAX_PATH git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17049 a1c6a512-1295-4272-9138-f99709370657
2008-03-26fix the buttonbar in the browser and menus. Jonathan Gordon
fix a problem where the menus wouldnt redraw when they should have when settings change git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16816 a1c6a512-1295-4272-9138-f99709370657
2008-03-26the menu and list now accepts a parent viewport to draw in (and the menu can ↵Jonathan Gordon
be told to not show status/button bars). This lays the groundwork to fix colour problems with plugin menus (see star.c for an example.) This hopefully fixes some button bar issues as well as theme problems. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16812 a1c6a512-1295-4272-9138-f99709370657
2008-03-05FS#8457 - convert the list drawing code to use viewports. This does not ↵Jonathan Gordon
include any of the customizability which was in the patch, so unless any bugs show up users should not notice any difference. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16527 a1c6a512-1295-4272-9138-f99709370657
2007-12-17remove the duplicated gui_list struct and only duplicate the members which ↵Jonathan Gordon
are actually different on each screen. should translate to a smaller bin and easier code (users shouldnt notice any difference) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15947 a1c6a512-1295-4272-9138-f99709370657
2007-10-21allow simplelists to set the timeout and the start selection.Jonathan Gordon
set a slightly saner default timeout talk the selected item when the list is first displayed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15247 a1c6a512-1295-4272-9138-f99709370657
2007-10-21remove the seelection_size param from the info init call to hopefully ↵Jonathan Gordon
decrease the bin size a bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15237 a1c6a512-1295-4272-9138-f99709370657
2007-10-21simplify the simpelist api slightly so not every struct member needs to be ↵Jonathan Gordon
init manually. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15236 a1c6a512-1295-4272-9138-f99709370657
2007-10-21Accept FS#7774: Voice callback for gui_synclist.Stéphane Doyon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15231 a1c6a512-1295-4272-9138-f99709370657
2007-10-20add a list API for simple lists which dont need lots of code to run.Jonathan Gordon
Example uses in debug_menu.c This API works best if most of the text is static, or not many actions need to acted on. (of course, any list could use this) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15221 a1c6a512-1295-4272-9138-f99709370657
2007-10-15Remove the "invert scroll" code since it's not used anywhere anymore (and it ↵Antoine Cellerier
was broken on color targets with gradients anyway). Closes FS #7875. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15125 a1c6a512-1295-4272-9138-f99709370657