fenfire-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fenfire-dev] darcs patch


From: Tuukka Hastrup
Subject: [Fenfire-dev] darcs patch
Date: Mon, 13 Dec 2004 03:33:35 +0200

Mon Dec 13 03:26:24 EET 2004  Tuukka Hastrup <address@hidden>
  * hacked in ViewportLob.getVisibleFraction for scrollbar knob size

Mon Dec 13 03:28:26 EET 2004  Tuukka Hastrup <address@hidden>
  * implemented scrollbar knob sizing as knobFractionModel

Mon Dec 13 03:30:14 EET 2004  Tuukka Hastrup <address@hidden>
  * made the ListBox in default theme use scrollbar knob sizing

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


New patches:

[hacked in ViewportLob.getVisibleFraction for scrollbar knob size
Tuukka Hastrup <address@hidden>**20041213012624] {
hunk ./org/nongnu/libvob/layout/ViewportLob.java 39
+    protected Model visibleFractionModel;
+
hunk ./org/nongnu/libvob/layout/ViewportLob.java 45
+       this.visibleFractionModel = new FloatModel();
hunk ./org/nongnu/libvob/layout/ViewportLob.java 52
- -     return new ViewportLob(axis, (Lob)params[0], (Model)params[1]);
+       ViewportLob ret =  new ViewportLob(axis, (Lob)params[0], 
(Model)params[1]);
+       ret.visibleFractionModel = this.visibleFractionModel;
+       return ret;
hunk ./org/nongnu/libvob/layout/ViewportLob.java 59
+    public Model getVisibleFractionModel() {
+       return visibleFractionModel;
+    }
+
hunk ./org/nongnu/libvob/layout/ViewportLob.java 74
+
+       
visibleFractionModel.setFloat(axis.coord(width,height)/content.getNatSize(axis));
}

[implemented scrollbar knob sizing as knobFractionModel
Tuukka Hastrup <address@hidden>**20041213012826] {
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 40
- -     MAXIMUM_MODEL = "http://fenfire.org/2004/07/layout/scrollbarMaxModel";;
+       MAXIMUM_MODEL = "http://fenfire.org/2004/07/layout/scrollbarMaxModel";,
+       KNOBFRACTION_MODEL = 
"http://fenfire.org/2004/07/layout/scrollbarKnobFractionModel";;
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 48
+    protected Model knobFractionModel;
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 50
- -    protected Model fract1, fract2;
+    protected Model fract1, fract2, knobFract;
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 62
+       this(axis, positionModel, maximumModel, null);
+    }
+
+    public Scrollbar(Axis axis, Model positionModel, Model maximumModel, 
+                    Model knobFractionModel) {
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 68
+
+       if (knobFractionModel == null)
+           knobFractionModel = new FloatModel(0.05f); 
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 74
+       knobFractionModel = Parameter.model(KNOBFRACTION_MODEL, 
knobFractionModel);
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 81
+       this.knobFractionModel = knobFractionModel;
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 85
+       knobFractionModel.addObs(this);
+
+       Model glueSizeModel = (new FloatModel(1)).minus(knobFractionModel);
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 91
+
+       this.fract1 = this.fract1.times(glueSizeModel);
+       this.fract2 = this.fract2.times(glueSizeModel);
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 95
+       this.knobFract = knobFractionModel;
hunk ./org/nongnu/libvob/layout/component/Scrollbar.java 142
- -     return buttonRect(10, 10, 10);
+       Model zero = new FloatModel(0);
+       Lob buttonRect = buttonRect(10, 10, 10);
+       return new RequestChangeLob(axis, buttonRect, zero, zero, knobFract);
}

[made the ListBox in default theme use scrollbar knob sizing
Tuukka Hastrup <address@hidden>**20041213013014] {
hunk ./org/nongnu/libvob/layout/component/Theme.java 203
- -     l = new ViewportLob(Lob.Y, seq, seq.positionModel(Lob.Y, index));
- -     l = new ClipLob(l, "VIEWPORT-CLIP");
+       ViewportLob viewl = new ViewportLob(Lob.Y, seq, 
seq.positionModel(Lob.Y, index));
+       l = new ClipLob(viewl, "VIEWPORT-CLIP");
hunk ./org/nongnu/libvob/layout/component/Theme.java 211
- -     box.add(new KeyLob(new Scrollbar(Lob.Y, index, lengthModel.minus(1)),
+       box.add(new KeyLob(new Scrollbar(Lob.Y, index, lengthModel.minus(1), 
viewl.getVisibleFractionModel()),
}



Context:

[scrollbar fixes
Benja Fallenstein <address@hidden>**20041210155700] 
[Simplify how CLASSPATH is set; remove collections-kaffe which we don't depend 
on any longer (it was a copy of Kaffe's collections implementation to allow us 
to run on 1.1 Javas)
Benja Fallenstein <address@hidden>**20041210120308] 
[README fixes; bug spotter: ibid
Benja Fallenstein <address@hidden>**20041210111035] 
[fix for ArrayOutOfBounds occuring sometimes when a cs is last in chain
Benja Fallenstein <address@hidden>**20041210023901
 
 Spotter: Tuukka Hastrup
 
 21:17 < tuukkah> not at least easily reproducible: write something 
                  in fiction, click a button, get an exception 
                  at DefaultVobMap.java:420
 21:32 < tuukkah> doesn't that mean that there was some textChar[ics] 
                  for which there was not nextInChain[ics]. a wild guess 
                  would be to move the test textChar[ics] > 0 
                  to the beginning of the loop
 04:31 < benja>   oh, I haven't seen the nextInChain one
 04:35 < benja>   tuukkah: I'm adding 'if(ics<nextInChain.length) break;' 
                  before 'ics = nextInChain[ics]'
 04:36 < benja>   or hmm
 04:36 < benja>   yes
 04:37 < benja>   nextInChain is only expanded when you call chain(cs1, cs2) 
                  with cs1 >= nextInChain.length
 04:37 < benja>   however, in this case, ics is the *last* cs in the chain
 04:37 < benja>   so chain(ics, *) never gets called
 04:38 < benja>   but it has to be 'if(ics>=nextInChain.length) break'
 04:38 < benja>   since if it is larger or equal, we know that chain(ics, *) 
                  has never been called, thus ics doesn't have a successor 
                  in the chain
 
 (i.e., tuukkah was right that this means there's no nextInChain[ics],
 but the correct fix was different)
] 
[more refactoring for fenfeed
Benja Fallenstein <address@hidden>**20041209134529] 
[add c++-generated files to darcs to make compiling easier (i.e., make possible 
to compile java w/o compiling c++)
Benja Fallenstein <address@hidden>**20041209132544] 
[use a setter-based approach rather than a keyword-based approach for component 
parameter setting
Benja Fallenstein <address@hidden>**20041209113814
 
 After experience with my earlier patch providing syntactic sugar
 for lob construction, I decided the approach I took there doesn't
 work that well with Java. I decided to use a more classical approach
 with setter methods (i.e., construct the object, then object.setXYZ()).
 
 In addition, I came up with a little code convention for syntactically grouping
 the code that sets up one component. Example:
 
 ListBox noteList = new ListBox(rlob.listModel(notes, dateCmp); {
     noteList.setTemplate(rlob.label("*", TITLE));
     noteList.setKey("NOTES");
 }
 
 Note that this merely starts a new Java block after the end of the
 "ListBox ... = ...;" instruction.
] 
[Refactor: start work on easier convention for lob constructors
Benja Fallenstein <address@hidden>**20041209035806
 
 This is kind of an ugly implementation of Python's keyword arguments
 in pure Java. For example, a listbox can be created like this:
 
 ListBox noteList = 
     new ListBox(rlob.listModel(notes, dateCmp),
                "template", rlob.label("*", TITLE),
                "key", "NOTES");
 
 which means it has a named parameter "template" with value
 (rlob.label("*", TITLE)), and a named parameter "key" with value "NOTES".
] 
[support for textual lists, for fenfeed (to show different dc:subjects etc)
Benja Fallenstein <address@hidden>**20041208202803
 
 - ListModel.Join, to achieve similar effects as string.join() (though
   it's not exactly the same; Join([1,2,3],X) = [1,X,2,X,3])
 - Make Models able to create adapters with only a get() and no set() method
 - when cloning TextModels, remember whether to include a line end lob
   at the end of the text
] 
[create SequenceModel.Concat and TextModel.Concat, for creating bigger texts 
out of smaller ones
Benja Fallenstein <address@hidden>**20041207053036] 
[make interruptEventloop(), called by addTask(), actually interrupt the waiting 
for events on AWT so that background tasks can get processed
Benja Fallenstein <address@hidden>**20041206213657] 
[revamp FunctionModel
Benja Fallenstein <address@hidden>**20041206021411] 
[speed fix again...
Benja Fallenstein <address@hidden>**20041206000153] 
[CollectionModel.containsModel(m) creates a boolean model that says whether m 
is in the collection
Benja Fallenstein <address@hidden>**20041205235607] 
[speed fix
Benja Fallenstein <address@hidden>**20041205180639] 
[little fix
Benja Fallenstein <address@hidden>**20041205020445] 
[fix stupid scrolling bug
Benja Fallenstein <address@hidden>**20041204213033] 
[twiddle with clip interpolation
Benja Fallenstein <address@hidden>**20041127145955] 
[work around a bug in Classpath AWT (apparently), where mouse events get button 
'0' instead of 1
Benja Fallenstein <address@hidden>**20041127145846] 
[Make LobFont size specifiable by size in pixels instead of points, since the 
same point size can produce quite different text sizes with different fonts and 
AWT implementations; make most places not declare their own LobFonts, instead 
using the ones from Theme
Benja Fallenstein <address@hidden>**20041127145604] 
[make use of new interpolation system for clipping (do not put clipping cs in 
matcher if no explicit key is specified)
Benja Fallenstein <address@hidden>**20041127143752] 
[more consistency in the keying of themed components: handle Window and 
ThemeFrame like the other components; if no key is specified, do not put the 
component's cs into the vobmatcher (make it 'shown during interpolation' and 
not matched against anything in the target scene)
Benja Fallenstein <address@hidden>**20041127030024] 
[make StringTextModel not use a key by default (this means that text with no 
specified key will be 'shown during interpolation' and not matched against 
anything in the other vobscene)
Benja Fallenstein <address@hidden>**20041127025553] 
[more fixes for new interpolation system
Benja Fallenstein <address@hidden>**20041127023548] 
[finish the new interpolation system
Benja Fallenstein <address@hidden>**20041127000755] 
[mostly fix new interpolation system; w and h aren't interpolated yet
Benja Fallenstein <address@hidden>**20041126230007] 
[treat height<0 as height==0 in ScalableFont
Benja Fallenstein <address@hidden>**20041126224455] 
[add scaling lob
Benja Fallenstein <address@hidden>**20041126224416] 
[steps towards a slightly new interpolation system, where cs without keys are 
shown during interpolation
Benja Fallenstein <address@hidden>**20041126221611] 
[good riddance
Benja Fallenstein <address@hidden>**20041126163934] 
[Theme improvements
Benja Fallenstein <address@hidden>**20041126135534] 
[new primitive lob to tile another lob; use to show stipple in window (dialog 
box) titles
Benja Fallenstein <address@hidden>**20041126134043] 
[refactor: remove (float x, float y) parameters from Lob.render -- the parent 
can create a translated coordsys to specify the x/y
Benja Fallenstein <address@hidden>**20041126022111] 
[remove unused variable
Benja Fallenstein <address@hidden>**20041126012758] 
[rename fields in Box and javadoc some of them in the hope to make the code 
more comprehensible
Benja Fallenstein <address@hidden>**20041126012717] 
[Initial commit (address@hidden/libvob--darcs-import--0.1)
**20041125164113] 

Patch bundle hash:
b8f1041f7b9fc92317f46dc27ed4daf7f719b938
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBvPE6WkfGqVL3U04RAoy4AJ0R2stbQzBfd8ReD0IX1Y+hXaG6tgCcDBdi
W235dg+b4crYY8i7ZFBC9F0=
=efgG
-----END PGP SIGNATURE-----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]