-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathChangeLog
1138 lines (985 loc) · 48.5 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2009-08-05 Quentin Mathe <qmathe@club-internet.fr>
* ETDecoratorItem:
(+item): Added an assertion to check whether the receiver class is a
concrete subclass.
(-saveAndOverrideAutoresizingMaskOfDecoratedItem:,
-restoreAutoresizingMaskOfDecoratedItem:): Added. They allow to keep
in sync the autoresizing mask between a layout item and its last
decorator item.
(-handleDecorateItem:supervisorView:inView:, -handleUndecorate:inView:):
Updated to use the two new previous methods.
(-contentRect): Fixed to return a zero rect when the supervisor view is nil.
* ETWindowItem:
(-contentRect): Corrected an assertion check that was making some checks
based on invalid assumptions.
(-acceptsDecoratorItem:): Fixed an incorrect argument type declaration.
* ETScrollableAreaItem:
(-saveAndOverrideAutoresizingMaskOfDecoratedItem:): Added.
(-setWrappedView:): Removed the code that adjusts the autoresizing mask now
that ETDecoratorItem handles that.
* ETLayoutItem:
(-setFrame:): Fixed to trigger the position value update through
-setOrigin:, when the receiver is decorated.
(-setPosition:): Fixed to sync the position with the last decorator item
origin.
(-setBoundsSize): Fixed to sync the size with the last decorator item
size.
* TestItemGeometry:
Made various adjustments and added many new tests methods that cover the
various issues corrected with this commit.
2009-08-03 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
Declared some new property constants. Added _wasKVOStopped ivar.
(+automaticallyNotifiesObserversForKey:): Moved to ETLayoutItem+KVO.
(-stopKVOObservation, -stopKVOObservationIfNeeded): Added.
(-dealloc): Modified to use -stopKVOObservationIfNeeded and bypass
-setParentItem when nullifying weak references. Also documented it.
* ETLayoutItem+KVO:
Added as a new category to handle the KVO support.
* ETLayer, ETPickboard, ETInspector, ETObjectBrowser:
(-dealloc): Updated to invoke -stopKVOObservationIfNeeded.
* EtoileUIProperties:
Added.
* GNUmakefile, Source/GNUmakefile, Container.xcodeproj:
Included the new files.
2009-07-10 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
Added _autoresizingMask ivar.
(-autoresizingMask: -setAutoresizingMask:): Rewritten to store the mask
in the ivar and sync the supervisor view as necessary.
(-initWithView:value:representedObject:): Modified to initialize the new
ivar.
(-setView:): Modified to make the item view sizable inside the supervisor
view. The supervisor view resizes the item view.
* ETDecoratorItem:
(-setAutoresizingMask:):
* TestItemGeometry:
Written various autoresizing mask related tests.
2009-06-28 Quentin Mathe <qmathe@club-internet.fr>
* ETContainer:
(-setTemporaryView:): Removed. We now use the superclass implementation.
* ETLayout:
(-tearDown): Modified to use -setLayoutView: now provided by
ETLayoutingContext protocol.
(-setUpLayoutView): Rewritten to use -setUpLayoutView.
* ETView:
(-setContentView:isTemporary:): Disabled the code that touches the receiver
autoresizing mask.
* ETLayoutItemGroup:
(-setLayoutView:): Added.
* ETLayoutItem:
(-setView:): Improved to invoke -setAutoresizingMask:, this will currently
apply the new view autoresizing mask to the display view.
2009-06-23 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout:
Declared a ETLayoutingContextOptional protocol which extends indirectly
ETLayoutingContext.
* ETWidgetLayout:
Declared a protocol ETWidgetLayoutingContext.
* ETTableLayout:
Removed every container related methods use (not listing all the methods
in this entry).
(-_updateDisplayedPropertiesFromSource:): Rewritten to use -ifResponds and
access the source object through a parameter.
(-renderWithLayoutItems:isNewContent:): Updated to use -ifResponds and the
altered -_updatedDisplayedPropertiesFromSource:.
(-tableViewSelectionDidChange:): Removed code without any real use which
was forwarding -tableViewSelectionDidChange.
(-tableView:willDisplayCell:forTableColumn:row:): Removed (was a dead
method not compiled).
2009-06-21 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
(-didChangeLayout:): Modified to now update the layout view and the
scrollable area item visibility.
* ETLayoutItem+Scrollable:
(-updateScrollableAreaItemVisibility): Added.
(-didChangeDecoratorOfItem:): Moved the receiver validity check into a new
assertion.
* ETLayout:
(-isScrollable, -hasScrollers): Added.
* ETWidgetLayout:
(-hasScrollers): Added overriden method.
* ETObjectBrowserLayout:
(-hasScrollers): Added overriden method (temporary solution).
* ETContainer:
(-setTemporaryView:): Moved the code that controls the scrollable area
item visibility into -[ETLayoutItem(Scrollable)
updateScrollableAreaItemVisibility].
2009-06-12 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
Added _styleGroup ivar.
(-styleGroup, -setStyleGroup:, -dealloc): Updated to use the new ivar.
* ETStyle:
Altered to inherit from NSObject and not from ETObjectChain. Removed ivar
_nextStyle. Rewritten or updated both class and method documentation.
(-initWithStyle:, -initWithCollection:, -nextStyle, -setNextStyle:, -lastStyle):
Removed.
(-render:layoutItem:dirtyRect:, -didChangeItemBounds:): Modified to do
nothing now.
* ETStyleGroup:
Improved documentation.
2009-06-11 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
Added kETStyleGroupProperty property and removed kETStyleProperty.
(-styleGroup, -setStyleGroup:): Added.
(-style, setStyle:): Rewritten to use -styleGroup and be syntatic sugar to
access the first style.
(-initWithView:value:representedObject:, -dealloc, -copyWithZone:,
-properties): Updated.
* ETHandle:
(-[ETHandleGroup initWithActionHandler:manipulatedObject:]): Modified to
suppress ETBasicItemStyle instance which is set by ETLayoutItem.
(-[ETResizeRectangle style]): Removed.
(-[ETResizeRectangle render:dirtyRect:inView:): Renamed
-render:layoutItem:dirtyRect:, this way we now override the ETLayoutItem
main render method and the overriden -style can be removed.
* ETPickDropCoordinator:
(-draggingExited:): Fixed crash on inserting a nil drop indicator in
-insertDropIndicator:forDropTarget:. Assigning _previousDropTarget without
-updateDropIndicator:withDropTarget: was messing up the internal state.
Now we can be sure _previousDropTarget always has a valid drop indicator
set, and thereby no nil drop indicator will ever be inserted on a dragging
update.
(-dropIndicatorForDropTarget:, -insertDropIndicator:forDropTarget:,
-removeDropIndicatorForDropTarget:): Rewritten to use the style group
facility and get rid of the previous hack that involved to copy the
existing item style before inserting the drop indicator.
2009-06-09 Quentin Mathe <qmathe@club-internet.fr>
First step in making the styling support really usable and clean.
The current version implements styles as linked list which can bound to a
layout item with -setStyle:. However this doesn't work well because styles
tend to be shared and you get in trouble when you want to chain new styles
without altering all the items which share the existing style.
e.g. when the pick and drop coordinator tries to insert the drop indicator
style as the last style on a drop target, the drop indicator gets drawn on
every layouts items since they all use the same instance of ETBasicItemStyle as
their default style. The current workaround is to do roughly:
[[item style] setStyle: [[item style] copy]]
[[item lastStyle] setNextStyle: dropIndicator]
* ETStyleGroup.(h|m):
Added.
* EtoileUI.h, GNUmakefile, Source/GNUmakefile:
Updated.
2009-06-05 Quentin Mathe <qmathe@club-internet.fr>
* ETUIItem.(h|m):
Added.
* ETDecoratorItem.(h|m):
Extracted ETUIItem into the new header and source files mentionned just
above.
* EtoileUI.h:
Included both ETUIItem.h and ETDecoratorItem.h. The latter was previously
missing.
* GNUmakefile, Source/GNUmakefile:
Updated.
2009-06-05 Quentin Mathe <qmathe@club-internet.fr>
* ETUIItem (in ETDecoratorItem.(h|m)):
(-isDecoratorItem, -isWindowItem, -enclosingItem,
-convertRectToEnclosingItem:, -convertPointToEnclosingItem:): Added.
* ETCompatibility.h:
Added ASSERT_FAIL and ASSERT_INVALID_CASE utility macros.
2009-06-03 Quentin Mathe <qmathe@club-internet.fr>
Introduced ETUIItemFactory which takes over ETLayoutItem+Factory, this
category is going to be deprecated in a next commit.
* ETUIItemFactory:
Refactored ETLayoutItem+Factory in a standalone factory and cleaned the API.
Updated many method documentation and documented some methods which weren't.
All class methods are now instance methods of the factory.
(+factory): Added.
(+itemGroupWithView:, +itemGroupWithValue:, +floatingItemGroup): Eliminated
these methods declared in ETLayoutItem+Factory which have never found any
real use.
* GNUmakefile, Source/GNUmakefile, EtoileUI.h:
Updated.
2009-05-25 Quentin Mathe <qmathe@club-internet.fr>
* ETEvent:
(-locationInWindowItem, -locationInWindowContentItem):
Rewritten to return the event location in window base coordinates with
-locationInWindowItem and not -locationInWindowContentItem as wrongly
implemented previously. The previous implementation happens to work
correctly on Mac OS X, because the bottom border is zero pixel thick and
the window base coordinates are not flipped. I wrongly assumed that
the window coordinate base was the content view coordinate space (except it
was always non-flipped) when I initially wrote the code...
Now -locationInWindowContentItem depends on -locationInWindowItem as it
should and not the reverse as before.
(-location): Fixed to handle the case where the window layer uses flipped
coordinates. In fact, that's the default case with EtoileUI.
* ETInstrument:
(-hitTestWithEvent:): Improved to intercept and handle window layer
related events correctly. Renamed contentViewRelativePoint variable to
windowItemRelativePoint since that's now the case and removed the
warning comment, which doesn't hold anymore thanks to ETEvent whose
location-related methods are now sensible and consistent.
* test_ETInstrument.m: Updated, cleaned and improved the event handling
tests.
2009-05-14 Quentin Mathe <qmathe@club-internet.fr>
New event handling model - part 4
Snapshot of my current massive rewrite of EtoileUI event model.
This introduces a new event handling model based on instrument/tool concept.
Instruments/tools encapsulate the event handling logic and make it reusable,
they convert events into semantic actions and send these to layout items
(rather than events as other UI toolkits do).
Among the major new features are several tools (move, select, arrow, paint
bucket) which hands actions to the action handler bound to the layout item on
which the instrument/tool is acting upon. And many new DTP-like additions
such handles, grouping/ungrouping, rubber banding, z-index reordering etc.
This commit includes more or less unrelated changes such as several new layouts
template item layout, icon layout, form layout and various cleaned/rewritten
elements such as window item, window layout, AppKit to EUI layout item
builder, free layout etc. In addition, geometry and drawing fixes are bundled
with this elephant-style commit... not pretty, but let say that the hackathon
is a good excuse to do that!
PhotoViewExample has also been almost entirely rewritten to conform to the
latest EtoileUI API trends :-) Few other examples remain to be updated.
2009-04-16 Quentin Mathe <qmathe@club-internet.fr>
* ETDecoratorItem:
(-decorationRect): Fixed to behave correctly when the next decorator uses no
supervisor view.
(-decorationSizeForContentSize:): Added.
(-decoratedItemRectChanged:): Updated to use the previous method and call
-handleSetDecorationRect: now with the correct value.
* ETLayoutItem:
(-contentBounds): Reverted my previous change on -contentBounds which was
incorrect.
(-setContentBounds:): Modified to support to sync _contentBounds when the
supervisor view frame is altered even when the receiver has a decorator.
Previously -contentBounds value was invalid when the receiver had been
resized through its supervisor view itself resized by an enclosing
decorator (such as an ETWindowItem).
* ETScrollableAreaItem:
Fixed to have an underlying scroll view created at initialization.
(-init): Modified to call -initWithSupervisorView:.
(-initWithSupervisorView:): Added.
Tweaked ETScrollView to create an NSScrollView automatically when a nil
scroll view is passed to -initWithScrollView:layoutItem:.
* ETWindowItem:
(-handleDecorateItem:supervisorView:inView:): Modified to shrink the
content size and match the window frame with the decorated item one.
* ETView:
(-setFrame:, -setFrameSize:, -setFrameOrigin:): Modified to sync the
geometry even when a decorator is used on -layoutItem.
* test_ETLayoutItem.m:
Broken decorator geometry related into several methods. Updated various
tests and written -testTooManyDecoratorGeometry to test a window/scroll
decorator combo.
2009-04-13 Quentin Mathe <qmathe@club-internet.fr>
Moved syntactic sugar related to scrollers from ETContainer to a new
category ETLayoutItem+Scrollable. This works in tandem with
ETScrollableAreaItem decorator which wraps an underlying scroll view.
The cleaning of this code is not yet finished.
* GNUmakefile:
* Source/GNUmakefile:
Included ETLayoutItem+Scrollable.[h|m]
* Headers/EtoileUI.h: Included ETLayoutItem+Scrollable.h
* ETContainer:
Removed ivars _scrollViewDecorator and _scrollViewShown.
(-letsLayoutControlsScrollerVisibility,
-setLetsLayoutControlsScrollerVisibility:, -hasVerticalScroller,
-setHasVerticalScroller:, -hasHorizontalScroller, -setHasHorizontalScroller:
-scrollView, -isScrollViewShown): Deprecated and moved to
ETLayoutItem+Scrollable.
(-cacheScrollViewDecoratorItem:, -cachedScrollViewDecoratorItem,
-createScrollViewDecoratorItem, -setShowsScrollView:,
-didChangeDecoratorOfItem:): Moved to ETLayoutItem+Scrollable.
(-setLayoutView:, -setFrame:, -setFrameSize:): Updated to call the previous
methods on -layoutItem.
* ETView:
(-didChangeDecoratorOfItem:): Removed
* ETUIItem (in ETDecoratorItem.[h|m]):
(-didChangeDecoratorOfItem:): Added.
* ETLayout, ETWidgetLayout:
(-isWidget): Added.
* ETLayoutItem:
Added _scrollViewShown ivar. Removed _action, _target that were forgotten
here in a today commit, and also _reserved.
(-action): Corrected to return the action property stored in the
property dictionary.
* ETLayoutItemGroup:
Removed -isScrollViewShown implementation now handled by
ETLayoutItem+Scrollable.
* ETLayoutItem+Scrollable:
Added.
2009-04-13 Quentin Mathe <qmathe@club-internet.fr>
Moved target/action support from ETContainer to ETLayoutItem and
ETLayoutItemGroup.
Moved various ETContainer private methods to ETWidgetLayout, that are used
to synchronize the settings of widgets-based layouts with their layout
context. Synchronized properties include scroller visibility, target/action
etc.
* ETLayoutItem:
New 'target' and 'action' properties and related accessors.
(-properties): Updated.
* ETLayoutItemGroup:
New 'doubleAction' property and related accessors.
(-properties): Updated.
* ETContainer:
Removed ivars _doubleClickAction, _target, _doubleClickedItem,
_multipleSelectionAllowed and _emptySelectionAllowed.
(-doubleAction, -setDoubleAction:, -target, -setTarget:,
-doubleClickedItem): Deprecated and moved these methods into ETLayoutItem
and ETLayoutItemGroup.
(-allowsMultipleSelection, -setAllowsMultipleSelection:,
-allowsEmptySelection, -setAllowsEmptySelection:): Deprecated. To be
replaced later by the upcoming ETSelectTool (part of the new event handling
model). In the meantime, these properties will implicitly always be equal to
YES.
(-syncDisplayViewWithContainer:): Moved code into -[ETWidgetLayout
syncLayoutViewWithItem:] and modified simply to call this method now.
(-invocationForSelector:, -sendInvocationToDisplayView:,
-layoutViewWithoutScrollView): Moved to ETWidgetLayout.
(-forwardDoubleActionFromLayout:): Moved to ETWidgetLayout under the
name -doubleClick:.
* ETContainer+EventHandling:
(-mouseDown:): Updated to call -mouseDoubleClickItem.
(-mouseDoubleClickItem:): Renamed -mouseDoubleClick:item: and modified to
take in account 'doubleClickedItem' is now declared on ETLayoutItemGroup.
* ETLayout:
(-syncLayoutViewWithItem:): New abstract method.
* ETWidgetLayout:
(-syncLayoutViewWithItem:, -invocationForSelector:,
-sendInvocationToDisplayView:, -layoutViewWithoutScrollView,
-doubleClick:, -doubleClickedItem): Added.
* ETBrowserLayout:
(-doubleClick:): Updated to call the superclass implementation inherited
from ETWidgetLayout.
2009-04-07 Quentin Mathe <qmathe@club-internet.fr>
Finished to rework the geometry model to be consistent and better support
clipped content (e.g. when the content is scrollable). Now the frame is an
implicit property computed on demand (as CoreAnimation does it). The API
hasn't really changed though and this shouldn't impact existing applications.
* Container.xcodeproj: Updated.
* ETLayoutItem, ETLayoutItemGroup:
Reworked and finished the new geometry model. Many methods touched.
Extracted the decorator support in a new class ETDecoratorItem and
introduced acommon class ETUIItem which factors code shared by ETLayouItem
and ETDecoratorItem.
* ETDecoratorItem:
* ETScrollableAreaItem:
Rewritten decorator related code almost entirely to use the new geometry
model.
The decorator API is now easier to understand and cleaner.
Renamed and rewritten -convertDisplayRect:toAncestorDisplayView: that
handles how damaged areas are propagated back to the views in charge of the
display. This method is now written in a recursive style to make the code
less complex and support to invalid areas on decorators (not yet used though).
* ETWindowItem:
Rewritten.
* ETLayer.m:
* ELLayoutItemBuilder:
Fixed to create window items correctly.
* ETView:
Moved ETScrollView to ETScrollableAreaItem.
Overriden frame related setters to notify the layout item about geometry
changes.
* ETContainer:
Updated to use the right ETDecoratorItem type when needed.
* test_ETLayoutItem:
Updated to match new behaviors. Added some new geometry tests.
2009-03-18 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
(-setView:): Removed the code that checks whether the new view should be
set as a supervisor view or not.
* ETView:
(-initWithFrame:layoutItem:): Updated to use -setSupervisorView: through
-setLayoutItem: since -initWithView: won't work now to set a supervisor
view.
(-setLayoutItem:): Updated to use -setSupervisorView: as needed.
* test_ETLayoutItem, test_ETView:
Updated all tests that which were using -setView: or -initWithView: to
set a supervisor view.
2009-03-17 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
(-view): Simplified -[ETLayoutItem view] to never return the supervisor view
itself but only its wrapped view.
-(beginEditingUI): Updated to use -supervisorView.
* ETLayoutItemGroup
(-isContainer, -handleAttachViewOfItem:, -setVisibleItems:forItems:,
-itemScaleFactor, -visibleContentSize, -isScrollViewShown, -setContentSize:):
Updated to use -supervisorView.
* ETLayoutItemGroup+Mutation:
(-container): Updated to use -supervisorView.
* ETLayout:
Replaced -view by -supervisorView in ETLayoutingContext protocol.
(-container): Updated to use -supervisorView.
* test_ETLayoutItem, test_ETLayoutItemBuilder, test_ETView:
Updated to use -view and -supervisorView as expected.
2009-03-09 Quentin Mathe <qmathe@club-internet.fr>
Implemented sorting and searching in the layout item tree. The controller
layer is now mostly finished. This code remains to be tested.
* ETController:
New ivars _sortDescriptors, _filterPredicate,
_automaticallyRearranges, _hasNewSortDescriptors, _hasNewFilterPredicate,
_hasNewContent.
(-init, -dealloc-: Updated.
(-filterPredicate, -setFilterPredicate:, -automaticallyRearrangesObjects:,
-setAutomaticallyRearrangesObjects:): Added.
* ETLayoutItemGroup:
(+isAutolayoutEnabled, +enablesAutolayout, +disablesAutolayout): Added.
Will probbly related instance methods in the long run.
(-dealloc): Updated.
(-properties): Removed 'layout' declaration now declared at ETLayoutItem
level.
(-sortWithSortDescriptors:recursively:, -filterWithPredicate:recursively:,
-arrangedItems, -isSorted, -isFiltered): Added. These methods are used by
ETController.
(-setSelectionIndexPaths:): Extracted some code into -didChangeSelection:
that lets external objects trigger selection notifications.
(-didChangeSelection:): Added.
2009-03-08 Quentin Mathe <qmathe@club-internet.fr>
New event handling model - part 3
* ETLayoutItem
New boundingBox and layout property. Added _boundingBox ivar.
(-init): Updated to initialize boundingBox and have -setFlipped: alters the
supervisor view equivalent property as it should.
(-usesWidgetView, -layout, -setLayout:, -setNeedsDisplayInRect:,
-displayRect:, -boundingBox, -setBoundingBox:): Added.
(-properties): Updated to expose boundingBox, layout and autoresizingMask.
(-setNeedsDisplay:): Moved the existing code into -setNeedsDisplayInRect:.
(-display): Moved the existing code into -displayRect:.
(-convertDisplayRect:toAncestorDisplayView:): Fixed to take in account
the case where the display view is NSThemeFrame and the content view must
be rather returned.
(-respondsToSelector:, -methodSignatureForSelector:, -forwardInvocation:):
New methods to support the EtoileUI custom responder chain and to hand
actions to the action handler.
* NSView+Etoile, Controls+Etoile:
(-isWidget): Added.
2009-03-07 Quentin Mathe <qmathe@club-internet.fr>
* ETFreeLayout:
Corrected header import statements to be local.
(-loadPersistentFramesForItems:): Improved to check unitialized persistent
frame properly and documented.
(-resetItemPersistentFramesWithLayout:): Renamed
-resetItemLocationsWithLayout: and rewrote it to eliminate dependency on
ETContainer and works with invisible items too. Documented too.
2009-03-06 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
(-convertDisplayRect:toAncestorDisplayView:): Fixed an infinite loop issue
that occurs when trying to redisplay a rect which extends beyond the
boundaries of the topmost ancestor display view.
(-setImage:): Modified to update the default frame with the image size,
otherwise the default frame is zero and any scaling done at layout time
will always result in a negative size.
* ETLayout:
(-resizeLayoutItems:toScaleFactor:): Enabled scaling in all cases, now that
we can support it on layout items without a view.
* ETLayoutItemGroup:
(-display:item:dirtyRect:inView:): Fixed coordinate matrix corruption which
happens when -[ETLayout rootItem] returning a nil item in the calling
method.
(-updateLayout:): Cleaned and documented.
* ETStyle:
(-drawImage:flipped:inRect:): Fixed to work more or less on GNUstep by
using a flip transform. But... NSImage doesn't seem to always draw
themselves properly on GNUstep when the context uses flipped coordinates.
The new code also allows to safely draw cached images on Cocoa
(-[NSImage setFlipped:] isn't reliable in that case).
2009-03-05 Quentin Mathe <qmathe@club-internet.fr>
* Collage:
Added a preliminary structured graphics editor example.
2009-02-17 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
(-initWithView:value:representedObject:): Turned flipped coordinates on by
default.
(-setSupervisorView:): Modified to sync the new supervisor view with the
flipped property of the layout item.
(-setFrame:): Modified to notify the style object about bounds change.
2009-02-15 Quentin Mathe <qmathe@club-internet.fr>
* ETView:
(-release): Rewritten retain cycle management code/doc a bit to be easier to
understand.
(-_recursiveDisplayAllDirtyWithLockFocus:visRect:): Modified to mark
_wasJustRedrawn.
(_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:):
Added to truly redraw properly on Mac OS X in all cases.
(-[ETScrollView initWithFrame:layoutItem:]): Modified to use no scrollers
by default, otherwise -[ETContainer hasVerticalScroller] wrongly starts to
return YES once the layout is switched, because -setLayoutView: causes the
scroll view decorator to be created like that:
-[ETContainer createScrollViewDecoratorItem]
-[ETContainer scrollView]
-[ETContainer hasVerticalScroller]
-[ETContainer syncDisplayViewWithContainer]
-[ETContainer setLayoutView:]
* ETContainer:
(-setHasVerticalScroller:, -setHasHorizontalScoller:): Imrproved to only
insert the scroll view decorator when a scroller becomes a visible.
(-createScrollViewDecoratorItem): Added an assertion to check the scroller
visibility meet our expectations.
2009-02-14 Quentin Mathe <qmathe@club-internet.fr>
* ETStyle:
(-[ETStyle didChangeItemBounds:]): Added.
ETBasicItemStyle
(-render:layoutItem:dirtyRect:): Updated.
(-drawImage:flipped:inRect:): Modified to draw properly even if the item is
flipped.
(-drawStackIndicatorInRect:): Added.
2009-01-30 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
(-render:dirtyRect:inView:): Modified to draw the layout item tree
encapsulated in the layout, this way we can really support arbitrary UI
composition.
(-display:item:dirtyRect:inView:): Fixed to check the flipping correctly.
(-unmakeGroup): Rewritten to be usable.
2009-01-30 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
For clarity, splitted the index and path based informal source protocol into
two distinct protocols.
(-itemsWithSubviewsOfView:): Moved to ETLayoutItemBuilder.
(-handleAttachViewOfItem:, -handleDetachViewOfItem:, -handleAttachItem:,
-handleDetachItem:): Improved the documentation and tidied the code a bit.
Improved and reformatted the documentation of methods related to the
represented object or source object.
* ETLayoutItemBuilder:
(-renderView:): Improved to set the persistent frame on each built item.
Thereby the existing view frames are never lost when we set a layout
(by default the layout of each built item group is nil here).
2009-01-30 Quentin Mathe <qmathe@club-internet.fr>
* ETLayer:
Added an experimental ETWindowLayout with the possibility to switch the
layout of the window layer from a WM-based layout to a layout such as
outline, table, flow etc.
ETWindowLayer
Added _visibleWindows and _rootWindow ivar.
(-init, -dealloc): Updated.
(-_createRetainedRootWindow, -hideHardWindows, -showHardWindows): Added.
(-setLayout:): Overriden to use the previous two methods.
2009-01-29 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout:
(-setLayoutContext:): Documented new display view removal code in details.
(-render:isNewContent): Moved layout context check to -canRender. Moved
code incorrectly disabled that removes display views to -setLayoutContext:.
2009-01-28 Quentin Mathe <qmathe@club-internet.fr>
* ETContainer:
Removed ETContainerSelectionDidChangeNotification.
* ETLayoutItemGroup:
Added ETItemGroupSelectionDidChangeNotification. Updated and reformatted
selection related method documentation. Removed some unecessary extra tabs
in the methods.
(-setSelectionIndexPaths:): Updated to send the new notification to the
delegate.
* ETPaneLayout, ETPaneSwitcherLayout, ETInspector, ETTableLayout: Updated
to use the new notification.
2009-01-28 Quentin Mathe <qmathe@club-internet.fr>
* ETTableLayout:
Rewritten a bit various methods to be shorter by using more syntatic sugar.
(-setLayoutView:): Modified to use FOREACH, A, ETLayoutItemPboardType
constant and -tableView.
(-setDisplayedProperties:, -selectedItems): Modified to use FOREACH.
2009-01-28 Quentin Mathe <qmathe@club-internet.fr>
* ETPickboard:
Corrected header import statements and removed extra tab or unecessary
spacing in various methods.
(-layoutItemWithObject:): Rewritten with FOREACH and documented.
(-[ETPickCollection initWithCollection:]): Rewritten with SUPERINIT.
2009-01-27 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
(-displayedItemPropertiesInItemGroup:): Added. Moved ETContainer equivalent
declaration to ETLayoutItemGroup source protocol.
* ETContainer:
(-displayedItemPropertiesInContainer:): Removed.
* ETInspector, ETViewModelLayout, ETTableLayout, ETObjectBrowserLayout,
ObjectManagerExample, PhotoViewExample:
Updated to use the new method.
2009-01-27 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
Moved ETContainer index path-based source protocol to ETLayoutItemGroup, in
that way it is centered around the base item.
(-itemGroup:numberOfItemsAtPath:, itemGroup:itemAtPath:): Added.
* ETContainer:
(-numberOfItemsInContainer:, container:itemAtIndex:):
(-container:numberOfItemsAtPath::, container:itemAtPath:):
Removed.
* ETLayoutItemGroup+Mutation, ETInspector, ETBrowserLayout,
ETObjectBrowserLayout, ObjectManagerExample:
Updated to use the new index path-based source protocol.
2009-01-27 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
Moved ETContainer index-based source protocol to ETLayoutItemGroup, in that
way it is centered around the base item.
(-numberOfItemsInItemGroup:, itemGroup:itemAtIndex:): Added.
* ETContainer:
(-numberOfItemsInContainer:, container:itemAtIndex:): Deprecated
* ETLayoutItemGroup+Mutation, ETViewModelLayout, ObjectManagerExample,
PhotoViewExample, PaneExample:
Updated to use the new index-based source protocol.
Also improved PhotoViewExample to take in account composite layout when the
positional constraints are altered.
2009-01-27 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItemGroup:
(-source):
(-setSource:):
New methods moved out of ETContainer.
* ETContainer:
Removed _dataSource ivar (now declared as a property on ETLayoutItemGroup).
(-source, -setSource:): Deprecated.
2009-01-26 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem:
Added kETRepresentedPathProperty. Moved property access macros to
ETCompatibility.h
(-representedPathBase): Modified to return the property rather than nil
by default.
* ETLayoutItemGroup:
(-representedPathBase): Removed this overriden method version.
(-setRepresentedPathBase:): New method based on the old
-[ETContainer representedPath].
* ETContainer:
Removed _path ivar (now declared as a property on ETLayoutItem).
(-representedPath, -setRepresentedPath:): Deprecated.
2009-01-24 Quentin Mathe <qmathe@club-internet.fr>
* ETContainer (-dealloc): Fixed a nasty double release error by removing
DESTROY(_layoutView). This ivar is weak reference, hence this line results
in an extra release that translates in more or less random crashes when a
view-based layout is released. Here is the sequence that leads to the crash:
- an item group is deallocated and it releases its layout
- the layout is deallocated and releases its layout view
At this point the layout view is still retained by the container as a subview
... but later:
- the container is deallocated and wrongly releases its layout view (which
was not retained in -setLayoutView:)
- the layout view is deallocated
- the container deallocation code terminates with [super dealloc] which
tries to release its subviews and thereby crashes when trying to send
-removeFromSuperview to the deallocated layout view.
The crash happens very often on a window close which releases the layout
item tree it decorates. This fix should also solve random crashes that were
reported when the application terminates (and closes its windows).
2009-01-19 Quentin Mathe <qmathe@club-internet.fr>
* ETViewModelLayout:
Corrected header import statements.
New ivar _shouldInspectRepresentedObjectAsView. Documented API.
(-awakeFromNib): Replaced the table layout by an outline one. Improved the
the column header readability and look by providing property display names.
Increased how much content can be viewed without scrolling or resizing by
setting the property view content font size to small.
(-shouldInspectRepresentedObjectAsView,
-setShouldInspectRepresentedObjectAsView:, -inspectedItem): Added.
Added a category to ETInstanceVariable to make each ivar object traversable
by explosing it as a collection of ivars if the ivar value is an object.
(-doubleClickInPropertyView:): Rewritten to use -explore:.
(-setLayoutContext:): Removed.
(-object:itemRepresentingSlotAtIndex:, -numberOfSlotsInObject:): Rewritten
to better leverage EtoileFoundation reflection layer. Temporarily disabled
the listing of methods.
(-numberOfItemsInContainer:): Tweaked to make use of
-shouldInspectRepresentedObjectAsView.
* NSObject+EtoileUI:
Added -explore: to inspect objects with developer-centric inspector based
on ETViewModelLayout. Still a bit rough...
2009-01-19 Quentin Mathe <qmathe@club-internet.fr>
* ETLayoutItem+Factory:
Corrected header import statements.
(+itemGroupWithRepresentedObject:): Added.
(+itemGroupWithContainer): Added a temporary hack to make autoresizing work.
(+itemWithBezierPath:, +rectangleWithRect:, +rectangle, +ovalWithRect:,
+oval): Added various shape-based item factory methods.
2009-01-19 Quentin Mathe <qmathe@club-internet.fr>
* Headers/ETShape.h:
* Source/ETShape.m:
Removed previous code and added new class ETShape.
2009-01-19 Quentin Mathe <qmathe@club-internet.fr>
Rewritten the basic inspector support to be entirely handled outside of
ETContainer.
* ETContainer:
Corrected EtoileUI header import statements to be local.
Removed _inspector ivar and related code in -initWithFrame:layoutItem: and
-dealloc.
Removed ETObjectInspection conformance.
(-inspect:, -inspectSelection:): Deprecated and rewritten to rely on
NSObject+EtoileUI and ETLayoutItem.
(-setInspector:, -inspector, -inspectorForItems:): Removed.
* ETLayoutItem:
New property kETInspectorProperty.
(-validateUserInterfaceItem:): Added. This will be used by the new event
handling model.
(-showInspectorPanel): Removed.
(-inspector): Rewritten.
(-setInspector:): Added.
* NSObject+EtoileUI (-inspect:): Modified to use the inspector provided by
the receiver when a custom one is available.
* ETInspecting: Renamed inspectedItems property of ETInspector protocol to
inspectedObjects.
* ETInspector: Removed the deprecated inspectedItems accessors.
2009-01-18 Quentin Mathe <qmathe@club-internet.fr>
* ETApplication (-finishLaunching): Fixed the missing title of the
application menu on GNUstep and the repeated logging of 'Services menu not
in main menu!'. This bug was recently introduced with r4188.
2009-01-09 Quentin Mathe <qmathe@club-internet.fr>
Optimized drawing to only redraw dirty portion of the layout item tree.
More documentation.
Few new utility methods related to the drawing or the geometry.
* ETLayoutItem:
Documented various methods.
(-initWithView:value:representedObject:): Modified to set a default frame
if no view is provided.
(-isBaseItem, -closestAncestorItemWithDisplayView,
-convertDisplayRect:toAncestorDisplayView:, -boundingBox,
-convertRectToParent:fromItem:, -convertRect:toItem:, -acceptsActions):
Added.
(-setSelected:): Made KVO compliant.
(-setNeedsDisplay:, -display): Rewritten to only trigger the redraw of the
receiver area in the view hierarchy. The dirty rect is computed with
-convertDisplayRect:toAncestorDisplayView:.
2008-12-30 Quentin Mathe <qmathe@club-internet.fr>
Extended ETApplication with a new Arrange built-in menu and the possibility
to instantiate a main controller specified in the info plist of the
application bundle.
Corrected header import statements.
* ETApplication:
Added ETApp macro. Documented the class a bit more. New enum for menu item
tags.
(-finishLaunching): Reworked to set up the menu bar as soon as possible.
(-_instantiateAppDelegateIfSpecified): Added.
(-developmentMenuItem:): Updated to use +menuItemWithTitle:tag:action:
category and ETDevelopmentMenuTag.
(-arrangeMenuItem): Added.
(+[NSMenuItem(Etoile) menuItemWithTitle:tag:action:]): Added.
2008-12-26 Quentin Mathe <qmathe@club-internet.fr>
Some work to clean and improve the geometry support.
* ETLayoutItem:
Removed _defaultFrame ivar. Declared kETDefaultFrameProperty,
kETFlippedProperty, kETAnchorPointProperty and kETNeedsDisplay. Added
HAS_PROPERTY macro.
(-display, -bounds, -centeredAnchorPoint, -anchorPoint, -setAnchorPoint:
-position, -setPosition:): Added.
(-setFlipped:): Modified to adjust the anchor point if needed.
(-isFlipped): Added a check to ensure -isFlipped is consistent between
the supervisor view and the item.
(-defaultFrame, -setDefaultFrame:): Modified to store its value in the
variable properties and returns a null rect by default.
2008-12-15 Quentin Mathe <qmathe@club-internet.fr>
New event handling model - part 2
Added an ETActionHandler skeleton that will replace the event handler
logic located in ETLayoutItem+Events.
Added new geometry methods to ETLayoutItem that will be used to dispatch
events in the layout item tree.
* ETLayoutItem:
(-eventHandler): Deprecated.
(-actionHandler, -setActionHandler): Added. Thought to replace -eventHandler.
(-convertRectToParent:, -convertRectFromParent:): Rewritten to work properly.
(-convertPointToParent:, -convertPointFromParent:, -containsPoint:,
-pointInside:, -isFlipped): Added.
(-copyWithZone:, -dealloc): Updated to take in account the action handler.
(-init): Ditto. Also modified to initialize the property dictionary
immediately rather than lazily in -variableProperties.
* ETLayoutItem+Events:
Added an ETActionHandler skeleton.
2008-12-12 Quentin Mathe <qmathe@club-internet.fr>
Turned ETContainer(ETController) into a standalone ETController class.
* ETContainer:
Moved _objectClass, _groupClass, _templateItem and _templateItemGroup ivars
to ETController.
* ETController:
Added _content ivar.
(-init, -dealloc, -setContent:, -selectionIndex, -setSelectionIndex:,
-selectionIndexes, -setSelectionIndexes:): Added.
(-content): Modified to return the ivar value now.
(-newObject, -newGroup): Modified to use the new content property.
* ETLayoutItemGroup.m:
(-newItem, -newItemGroup, itemWithObject:isValue:): Moved to
ETLayoutItemGroup+Mutation category.
* ETLayoutItemGroup+Mutation:
Declared kETControllerProperty.
* test_ETController.m: Updated.
2008-12-08 Quentin Mathe <qmathe@club-internet.fr>
New event handling model - part 1
* ETEvent:
Rewritten ETEvent to be a standalone event class that wraps backend events
rather than an NSEvent subclass. NSEvent initializers don't expose all
the initialization, so the subclass choice was troublesome.
* ETLayoutItem+Events (-beginDrag:forItem:image:layout:): Updated to pass a
backend event to an AppKit drag related method.
2008-09-04 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout
New work-in-progress protocols ETPositionalLayout and ETCompositeLayout.
(-isComposite): Added.
(-resizeLayoutItems:toScaleFactor:, -setItemSizeConstraintStyle:):
Documented.
(-render:isNewContent:): Commented out the call to -setVisibleItems:, so the
visibility of the items is only handled in
-renderWithLayoutItems:isNewContent:.
2008-09-04 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout (-resizeLayoutItems:toScaleFactor:): Applied item size contraint
only if requested, when -itemSizeConstraintStyle returns another value than
ETSizeConstraintStyleNone. This fixes the case where a zero size is
returned by -constrainedItemSize and wrongly applied with the scaling.
2008-09-03 Quentin Mathe <qmathe@club-internet.fr>
Extracted -[ETBasicItemStyle render:layoutItem:dirtyRect:] into two new
methods. Enhanced existing code to draw a way more pretty selection
indicator (light gray interior, dark gray border), instead of the boring
blue square that was playing this role until then.
* ETStyle.[hm]:
(-[ETBasicItemStyle render:layoutItem:dirtyRect:]): Modularized the drawing
code into two new methods.
(-[ETBasicItemStyle drawImage:]):
(-[ETBasicItemStyle drawSelectionIndicatorInRect:]):
Added.
2008-09-03 Quentin Mathe <qmathe@club-internet.fr>
Made possible to create application without nibs on Mac OS X, by writing
the code that builds and installs the main menu. This will make the
maintenance of EtoileUI examples less a burden, no nibs and gorms to
keep in sync.
* ETApplication
More documentation.
(-_buildMainMenuIfNeeded, -_createApplicationMenu): New methods.
(-finishLaunching): Updated to call -_buildMainMenuIfNeeded.
2008-08-31 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout
(-tearDown, -selectionDidChangeInLayoutContext): New methods.
(-setLayoutContext:): Modified to call -tearDown if needed.
* ETLayoutItemGroup (-setLayout:): Cleansed. Moved layout view removal code
to -[ETLayout tearDown] since the layout is responsible of the layout view.
2008-08-31 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout
(-render:isNewContent:): Cleaned. Extracted the code that sets the initial
layout size into a new method -resetLayoutSize.
(-canRender, -resetLayoutSize): Added.
(-renderWithLayoutItems:isNewContent:): Moved up the item scaling call
from ETComputedLayout, and added a call to -resetLayoutSize so that the
initial layout is now set here instead of -render:isNewContent:.
* ETComputedLayout (-renderWithLayoutItems:isNewContent:): Moved the item
scaling back into ETLayout, so that it can be shared with other subclasses.
* ETFreeLayout: Fixed two compilation warnings (temporary fix).
2008-08-31 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout, ETComputedLayout:
(-layoutLineForLayoutItems:, -layoutModelForLayoutItems:,
-computeLayoutItemLocationsForLayoutModel:): Moved down to ETComputedLayout
subclass from ETLayout.
(-renderWithLayoutItems:isNewContent:): Moved implementation down to
ETComputedLayout.
* ETPaneLayout, ETPaneSwitcherLayout: Updated to get rid of the compilation
warnings triggered by these changes. Temporary fix until these classes are
rewritten.
2008-08-28 Quentin Mathe <qmathe@club-internet.fr>
* ETLayout (-resizeItems:toScaleFactor:): Fixed by removing an unwanted bit
of code, the items should now be scaled even when no item size constraint is
set.
* ETFlowLayout, ETLineLayout, ETStackLayout:
Defined subclass relative default values for item margin, item size
constraint and item constrained size. May need to be tweaked to be really
sensible.
2008-08-28 Quentin Mathe <qmathe@club-internet.fr>
Implemented item margin for flow, line and stack layouts. A big step for a
real photo view and an incremental step towards form layout :-)
Added a new abstract class ETComputedLayout, that will be useful to extract
state and behavior ETLayout.
* ETLayout:
Declared protocol ETPositionalLayout.
(-isPositional): Added.
(-isComputedLayout): Modified to return NO and updated the doc.
* ETFlowLayout, ETStackLayout:
Modified to inherit from ETComputedLayout and modified the layout
rendering methods to take in account the item margin.
* ETComputedLayout.[hm]: Added.
* EtoileUI.h: Included ETComputedLayout.h.
* Container.xcodeproj, GNUmakefile: Updated.