X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Ftui%2FTuiReaderMainWindow.java;h=b54d2cb695e45f87baf1ef70f9cf66aa01684a5b;hb=4f9478dce91ac4771d9d9fb96ae2b09bc04511cc;hp=18a1223bbe70ea49a2ce9b5bddc244b0fe6c1da8;hpb=cf9c5ed1164709d753d9c93ae8589f09b2f90ac0;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java index 18a1223..b54d2cb 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReaderMainWindow.java @@ -2,6 +2,7 @@ package be.nikiroo.fanfix.reader.tui; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import jexer.TAction; @@ -42,11 +43,28 @@ class TuiReaderMainWindow extends TWindow { this.reader = reader; - maximize(); - listKeys = new ArrayList(); listItems = new ArrayList(); - list = addList(listItems, 0, 0, getWidth(), getHeight(), new TAction() { + + // TODO size + onResize + + + + addLabel("Search: ", 5, 3); + addField(15, 3, 5, true); + + addLabel("Sort by: ", 5, 1); + // -1 = no default index (0 means first,...) 1=height when visible, null + // = action + List data = Arrays.asList("(show all)", "Source", "Name", "Author"); + // must be last so to be able to draw over the rest + // TODO: make it so we cannot add manual entries + // TODO: how to select the item via keyboard? why double-click via mouse? + addComboBox(15, 1, 12, + data, 0, Math.min(data.size()+1,getHeight()-1-1), + null); + + list = addList(listItems, 0, 7, getWidth(), getHeight(), new TAction() { @Override public void DO() { MetaData meta = getSelectedMeta();