diff --git a/android/theme/buttons.gif b/android/theme/buttons.gif new file mode 100644 index 000000000..3d8facd00 Binary files /dev/null and b/android/theme/buttons.gif differ diff --git a/android/theme/resize.gif b/android/theme/resize.gif new file mode 100644 index 000000000..630be1e26 Binary files /dev/null and b/android/theme/resize.gif differ diff --git a/android/theme/tab-sel-left.gif b/android/theme/tab-sel-left.gif new file mode 100644 index 000000000..bdee43c25 Binary files /dev/null and b/android/theme/tab-sel-left.gif differ diff --git a/android/theme/tab-sel-menu.gif b/android/theme/tab-sel-menu.gif new file mode 100644 index 000000000..d926650e7 Binary files /dev/null and b/android/theme/tab-sel-menu.gif differ diff --git a/android/theme/tab-sel-mid.gif b/android/theme/tab-sel-mid.gif new file mode 100644 index 000000000..fa8ed45fc Binary files /dev/null and b/android/theme/tab-sel-mid.gif differ diff --git a/android/theme/tab-sel-right.gif b/android/theme/tab-sel-right.gif new file mode 100644 index 000000000..d901fdba4 Binary files /dev/null and b/android/theme/tab-sel-right.gif differ diff --git a/android/theme/tab-unsel-left.gif b/android/theme/tab-unsel-left.gif new file mode 100644 index 000000000..eea22d8d8 Binary files /dev/null and b/android/theme/tab-unsel-left.gif differ diff --git a/android/theme/tab-unsel-menu.gif b/android/theme/tab-unsel-menu.gif new file mode 100644 index 000000000..a1720a589 Binary files /dev/null and b/android/theme/tab-unsel-menu.gif differ diff --git a/android/theme/tab-unsel-mid.gif b/android/theme/tab-unsel-mid.gif new file mode 100644 index 000000000..a2c5497b8 Binary files /dev/null and b/android/theme/tab-unsel-mid.gif differ diff --git a/android/theme/tab-unsel-right.gif b/android/theme/tab-unsel-right.gif new file mode 100644 index 000000000..91c03f5a9 Binary files /dev/null and b/android/theme/tab-unsel-right.gif differ diff --git a/android/theme/theme.txt b/android/theme/theme.txt new file mode 100644 index 000000000..87d2088c1 --- /dev/null +++ b/android/theme/theme.txt @@ -0,0 +1,110 @@ +# GUI - STATUS +status.notice.fgcolor = #000000 +status.notice.bgcolor = #818b95 +status.error.fgcolor = #ffffff +status.error.bgcolor = #662000 +status.edit.fgcolor = #000000 +status.edit.bgcolor = #cc9900 +status.font = SansSerif,plain,12 +#status.font.macosx = Helvetica,plain,12 + +# GUI - TABS +# settings for the tabs at the top +# (tab images are stored in the lib/theme folder) +header.bgcolor = #818b95 +header.text.selected.color = #1a1a00 +header.text.unselected.color = #ffffff +header.text.font = SansSerif,plain,12 +#header.text.font.macosx = Helvetica,plain,12 + +# GUI - CONSOLE +# font is handled by preferences, since size/etc is modifiable +console.color = #000000 +console.output.color = #cccccc +console.error.color = #ff3000 + +# GUI - BUTTONS +buttons.bgcolor = #4a545e +buttons.status.font = SansSerif,plain,12 +#buttons.status.font.macosx = Helvetica,plain,12 +buttons.status.color = #ffffff + +# GUI - MODE +mode.button.bgcolor = #9ca6b0 +mode.button.font = SansSerif,plain,9 +#mode.button.font.macosx = Helvetica,plain,9 +mode.button.color = #4a545e + +# GUI - LINESTATUS +linestatus.color = #ffffff +linestatus.bgcolor = #29333d + +# EDITOR - DETAILS + +# foreground and background colors +editor.fgcolor = #000000 +editor.bgcolor = #ffffff + +# highlight for the current line +editor.linehighlight.color=#e2e2e2 +# highlight for the current line +editor.linehighlight=true + +# caret blinking and caret color +editor.caret.color = #333300 + +# color to be used for background when 'external editor' enabled +editor.external.bgcolor = #c8d2dc + +# selection color +editor.selection.color = #ffcc00 + +# area that's not in use by the text (replaced with tildes) +editor.invalid.style = #7e7e7e,bold + +# little pooties at the end of lines that show where they finish +editor.eolmarkers = false +editor.eolmarkers.color = #999999 + +# bracket/brace highlighting +editor.brackethighlight = true +editor.brackethighlight.color = #006699 + + +# TEXT - KEYWORDS + +# e.g abstract, final, private +editor.keyword1.style = #cc6600,plain + +# e.g. beginShape, point, line +editor.keyword2.style = #cc6600,plain + +# e.g. byte, char, short, color +editor.keyword3.style = #cc6600,bold + + +# TEXT - LITERALS + +# constants: e.g. null, true, this, RGB, TWO_PI +editor.literal1.style = #006699,plain + +# p5 built in variables: e.g. mouseX, width, pixels +editor.literal2.style = #006699,plain + +# e.g. + - = / +editor.operator.style = #000000,plain + +# ?? maybe this is for words followed by a colon +# like in case statements or goto +editor.label.style = #7e7e7e,bold + + +# TEXT - COMMENTS +editor.comment1.style = #7e7e7e,plain +editor.comment2.style = #7e7e7e,plain + + +# LINE STATUS - editor line number status bar at the bottom of the screen +linestatus.font = SansSerif,plain,10 +#linestatus.font.macosx = Helvetica,plain,10 +linestatus.height = 20 diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index de0680b1f..4dfa1fb64 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -32,6 +32,7 @@ import java.util.zip.*; import javax.swing.*; import processing.core.*; +import processing.mode.android.AndroidMode; import processing.mode.java.*; @@ -84,8 +85,9 @@ public class Base { // a lone file menu to be used when all sketch windows are closed static public JMenu defaultFileMenu; - private Mode[] modeList; private Mode defaultMode = new JavaMode(this, getContentFile("modes/java")); + private Mode androidMode = new AndroidMode(this, getContentFile("modes/android")); + private Mode[] modeList = { defaultMode, androidMode }; private JMenu sketchbookMenu; @@ -1001,6 +1003,10 @@ public class Base { // skip .DS_Store files, etc (this shouldn't actually be necessary) if (!folder.isDirectory()) return false; + if (folder.getName().equals("libraries")) { + return false; // let's not go there + } + String[] list = folder.list(); // If a bad folder or unreadable or whatever, this will come back null if (list == null) return false; diff --git a/app/src/processing/mode/java/JavaBuild.java b/app/src/processing/mode/java/JavaBuild.java index 42414a825..80ed59458 100644 --- a/app/src/processing/mode/java/JavaBuild.java +++ b/app/src/processing/mode/java/JavaBuild.java @@ -759,7 +759,8 @@ public class JavaBuild { // Check if the user already has their own loader image File loadingImage = new File(sketch.getFolder(), LOADING_IMAGE); if (!loadingImage.exists()) { - File skeletonFolder = new File(Base.getContentFile("lib"), "export"); +// File skeletonFolder = new File(Base.getContentFile("lib"), "export"); + File skeletonFolder = mode.getContentFile("applet"); loadingImage = new File(skeletonFolder, LOADING_IMAGE); } Base.copyFile(loadingImage, new File(appletFolder, LOADING_IMAGE)); @@ -1441,7 +1442,12 @@ public class JavaBuild { protected void addClasses(ZipOutputStream zos, File dir) throws IOException { - addClasses(zos, dir, dir.getAbsolutePath()); + String path = dir.getAbsolutePath(); + if (!path.endsWith("/") && !path.endsWith("\\")) { + path += '/'; + } +// System.out.println("path is " + path); + addClasses(zos, dir, path); } diff --git a/todo.txt b/todo.txt index 10f52bc2b..2146877ed 100644 --- a/todo.txt +++ b/todo.txt @@ -9,6 +9,7 @@ X fix for linux build script (thanks to Kevin Keraudren) X http://code.google.com/p/processing/issues/detail?id=466 o occasional exception in "copy for discourse" o http://dev.processing.org/bugs/show_bug.cgi?id=729 +X move compiler to mode.java.* instead of runner fixed in 0192 J auto-format screws up if/else/else if blocks @@ -39,17 +40,24 @@ o message(new String(b, offset, length), err, false); o http://code.google.com/p/processing/issues/detail?id=197 X couldn't find a good way to reproduce this, closing -_ remove PdeKeyListener, roll it into the Java InputHandler for JEditTextArea - -_ can't do fileMenu.add(base.getSketchbookMenu()); inside ThinkDifferent -_ sketchbook location hasn't been determined yet - -_ add splash image on os x +macosx +X add splash image on os x If you want a bundled app to show a splash screen you can do so by adding an entry named SplashFile to the Java section of the Info.plist: SplashFile $JAVAROOT/splash.png I do not know if it still works but it did in 2008 (see ). +mode work +X opt for separate examples/sketchbook/libraries for each mode +X better to put the onus on the mode developers than users +X and rather than trying to figure out a complicated scheme for inclusion +X we can have something that takes care of auto-copying per-mode examples + +_ remove PdeKeyListener, roll it into the Java InputHandler for JEditTextArea + +_ can't do fileMenu.add(base.getSketchbookMenu()); inside ThinkDifferent +_ sketchbook location hasn't been determined yet + _ remove any reference to 'Editor' from Sketch.java _ or is that excessive, since Document is in there, etc _ Build does the heavy lifting anyway... @@ -69,18 +77,16 @@ _ casey's vote: _ Standard, Android, JavaScript, Jython _ or: Processing, Android, Processing.js, Processing.py -for the examples menu -top level directories will be grayed out categories - Basics, Topics, 3D, Books, Libraries, Contributed Libraries -'book' examples will be another category - i'll add vida examples, can offer to others if they want - should be "Getting Started" not GettingStarted -tempting to make an 'examples' button on the toolbar? - rather than merging things in an awkward way -also, move open to a submenu? - then we'd have open / recent / sketchbook - -move compiler to mode.java.* instead of runner +examples menu +X top level directories will be grayed out categories +X Basics, Topics, 3D, Books, Libraries, Contributed Libraries +X 'book' examples will be another category +X i'll add vida examples, can offer to others if they want +X should be "Getting Started" not GettingStarted +_ examples button on toolbar? +_ window that opens and contains list of examples +_ also, move open to a submenu? +_ then we'd have open / recent / sketchbook change 'export' to 'export applet' android will be "Export Project", "Export Release Application" @@ -91,11 +97,6 @@ _ this might be the same as arduino? We're making an assumption that the idea of a "library" refers to a block of Java-based code. The reasoning is that from within the PDE, we anticipate that it will be Java-compatible versions of other languages (such as Jython, JRuby, or Scala) as opposed to more generic languages. In the future we could open this up, but we'd rather not complicate things for the moment. -_ opt for separate examples/sketchbook/libraries for each mode -_ better to put the onus on the mode developers than users -_ and rather than trying to figure out a complicated scheme for inclusion -_ we can have something that takes care of auto-copying per-mode examples - _ on linux, mozilla shouldn't be the default browser anymore _ is there a way to query the default browser? gnome-open? xdg-open?