/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/view.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban/UI/view.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2755 - (view) (annotate) - [select for diffs]
Modified Thu Apr 12 09:21:58 2007 UTC (17 years, 10 months ago) by dpinte
File length: 15819 byte(s)
Diff to previous 2734 , to selected 610
2007-04-12 Didrik Pinte <dpinte@itae.be>

   * Removed workaround for file encoding in the Thuban code



Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 15840 byte(s)
Diff to previous 2718 , to selected 610
made a copy

Revision 2718 - (view) (annotate) - [select for diffs]
Modified Fri Jan 5 23:43:49 2007 UTC (18 years, 2 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15840 byte(s)
Diff to previous 2709 , to selected 610
2007-01-06 Didrik Pinte <dpinte@itae.be>

       UTF-8 locales support reading non utf-8 files. This is a workaround and
       not a real bugfix. See
       http://wald.intevation.org/tracker/index.php?func=detail&aid=118 for
       more details

       * Thuban/UI/
       tableview.py, controls.py, baserenderer.py, view.py: decode text from
       iso-8859-1 encoding.




Revision 2709 - (view) (annotate) - [select for diffs]
Modified Tue Oct 3 09:34:51 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15819 byte(s)
Diff to previous 2700 , to selected 610
2006-09-28 Didrik Pinte <dpinte@itae.be>

       * Thuban/UI/classgen.py: bugfix due to wx2.6 update

       * Thuban/UI/view.py: removed non needed declaration

       * Thuban/UI/selection.py : typo correction



Revision 2700 - (view) (annotate) - [select for diffs]
Modified Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15861 byte(s)
Diff to previous 2599 , to selected 610
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2599 - (view) (annotate) - [select for diffs]
Modified Wed Apr 13 16:08:33 2005 UTC (19 years, 10 months ago) by russell
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 16213 byte(s)
Diff to previous 2511 , to selected 610
Fixing bug #2921, panning with middle button not working without active tool


Revision 2511 - (view) (annotate) - [select for diffs]
Modified Mon Dec 27 16:31:32 2004 UTC (20 years, 2 months ago) by russell
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 16169 byte(s)
Diff to previous 2454 , to selected 610
The middle button now pans the map view.


Revision 2454 - (view) (annotate) - [select for diffs]
Modified Mon Dec 13 18:26:11 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15742 byte(s)
Diff to previous 2072 , to selected 610
* Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
renderer has to be at the same position as the mapregion

* Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
has to be moved by (self.shiftx, self.shifty) too.


Revision 2072 - (view) (annotate) - [select for diffs]
Modified Tue Feb 17 13:14:49 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15720 byte(s)
Diff to previous 2068 , to selected 610
Fix for RT#2245

* Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
instance variables before trying to create any windows.  Creating
windows can start an event loop if e.g. message boxes are popped
up for some reason, and event handlers, especially EVT_UPDATE_UI
may want to access things from the application.
(ThubanApplication.maps_changed): The mainwindow may not have been
created yet, so check whether it has been created before calling
its methods

* Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
have a map


Revision 2068 - (view) (annotate) - [select for diffs]
Modified Mon Feb 16 19:42:04 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15664 byte(s)
Diff to previous 2066 , to selected 610
(MapCanvas.Export): Remove accidentally added
line


Revision 2066 - (view) (annotate) - [select for diffs]
Modified Mon Feb 16 19:39:28 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15728 byte(s)
Diff to previous 1866 , to selected 610
(MapCanvas.Export): Avoid UnboundLocalError.


Revision 1866 - (view) (annotate) - [select for diffs]
Modified Mon Oct 27 13:01:58 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 15788 byte(s)
Diff to previous 1652 , to selected 610
Several rendering changes:

 - Render the selection into a separate bitmap so that only that
   bitmap needs to be redrawn when the selection changes

 - Render incrementally showing previews and allowing interaction
   before rendering is complete

 - Update the renderer interface a bit. Most parameters of
   RenderMap are now parameters of the constructor

* Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
and the update region as parameters. Update the doc-string
(BaseRenderer.render_map_incrementally): New. Generator function
to renders the map incrementally
(BaseRenderer.render_map): Remove the map argument (it's now in
the constructor) and simply iterate over the
render_map_incrementally generator to draw the map.
(BaseRenderer.draw_shape_layer_incrementally)
(BaseRenderer.draw_shape_layer): Renamed to
draw_shape_layer_incrementally and changed into a generator that
yields True every 500 shapes. Used by render_map_incrementally to
render shape layers incrementally

* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
map and region parameters which are now in the constructor
(ScreenRenderer.RenderMapIncrementally): New. Public frontend for
the inherited render_map_incrementally.
(BaseRenderer.draw_shape_layer): Removed.
(ScreenRenderer.draw_selection_incrementally): New. The selection
drawing part of the removed draw_shape_layer as a generator
(ScreenRenderer.layer_shapes): Update because of the region
parameter change
(ExportRenderer.__init__): New. Extend the inherited constructor
with the destination region for the drawing
(ExportRenderer.RenderMap): Removed the map and region parameters
which are now in the constructor

* Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
bitmap suitable for a preview in a tool
(CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
bitmap
(MapPrintout.draw_on_dc): Adapt to new renderer interface
(MapCanvas.OnPaint): Handle drawing the selection bitmap if it
exists
(MapCanvas.OnIdle): Update the logic to deal with incremental
rendering and the selection bitmap
(MapCanvas._do_redraw): Handle the instantiation of the render
iterator and the redraws during rendering
(MapCanvas._render_iterator): New. Generator to incrementally
redraw both bitmaps
(MapCanvas.Export): Adapt to new renderer interface.
(MapCanvas.full_redraw): Reset the selection bitmap and the
renderer iterator too
(MapCanvas.redraw_selection): New. Force a redraw of the selection
bitmap
(MapCanvas.shape_selected): Only redraw the selection bitmap


Revision 1652 - (view) (annotate) - [select for diffs]
Modified Mon Aug 25 15:59:58 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 13218 byte(s)
Diff to previous 1552 , to selected 610
(MapCanvas.OnLeftUp): Release the the mouse
before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
which leads to an effectively frozen X session because the user
can only interact with the dialog but the mouse is still grabbed
by the canvas.
Also, call the tool's Hide method before MouseLeftUp because
MouseLeftUp may change the tool's coordinates.


Revision 1552 - (view) (annotate) - [select for diffs]
Modified Wed Aug 6 17:21:32 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 12721 byte(s)
Diff to previous 1460 , to selected 610
* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
this class is now in BaseRenderer. This class is now practically
only a specialization of BaseRenderer for rendering to an actual
wx DC.
(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
to get the shapetype specific rendering functions.

* test/test_baserenderer.py: New. Test cases for BaseRenderer

* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
error_on_redraw to guard agains endless loops and stack overflows
when there's a bug in the rendering code that raises exceptions.
(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
rendering into a separate method _do_redraw so that error handling
is a bit easier. When an exception occurs, set error_on_redraw to
true. When it's true on entry to OnIdle do nothing and return
immediately.


Revision 1460 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 15:23:48 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 12345 byte(s)
Diff to previous 1456 , to selected 610
(MapCanvas.OnLeftDown): Capture the mouse.


Revision 1456 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 14:56:13 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 12313 byte(s)
Diff to previous 1454 , to selected 610
* Thuban/UI/viewport.py: Remove unused imports

* Thuban/UI/view.py: Remove unused imports


Revision 1454 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 14:41:04 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 12500 byte(s)
Diff to previous 1385 , to selected 610
* test/test_export.py Remove unused imports. The OutputTransform
function is now in viewport.py and is called output_transform
(TestScalebar.test_output_transform)
(TestScalebar.test_OutputTransform): Renamed to
test_output_transform and updated to use output_transform instead
of OutputTransform

* Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
renamed.
(MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
renamed to output_transform

* Thuban/UI/viewport.py (OutputTransform, output_transform):
Rename to output_transform


Revision 1385 - (view) (annotate) - [select for diffs]
Modified Thu Jul 10 14:52:39 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 13679 byte(s)
Diff to previous 1344 , to selected 610
Stripped out all non-wx functionality. Fixes RTTbug #1992.


Revision 1344 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 16:11:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39082 byte(s)
Diff to previous 1285 , to selected 610
Fixes RTbug #1974, 1971.
(MapCanvas.__init__): Subscribe to the idle time event. Set
        background color to white.
(MapCanvas.OnPaint): Set a flag indicating that we should
        render the map during idle time. If we already have a bitmap
        just draw it now.
(MapCanvas.OnIdle): New. Render the map only during idle time.
        This also fixes a problem with the busy cursor under gtk.


Revision 1285 - (view) (annotate) - [select for diffs]
Modified Mon Jun 23 10:30:53 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39104 byte(s)
Diff to previous 1277 , to selected 610
(MapCanvas.OnPaint): Call wxBeginBusyCursor()
        directly to avoid the wxSafeYield() call which generates an
        OnPaint event causing infinite recursion. Don't try to catch
        exception anymore. This was for before there were limits on map
        scaling.


Revision 1277 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 17:46:45 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39325 byte(s)
Diff to previous 1271 , to selected 610
Use Thuban[Begin|End]BusyCursor()
        instead of a direct call to wx[Begin|End]CusyCursor().
(MapCanvas.find_shape_at): Check if the current search layer
        support shapes, otherwise go on to the next layer.


Revision 1271 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 16:43:04 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39281 byte(s)
Diff to previous 1236 , to selected 610
(MapCanvas.OnPaint): Call wxYield after
        turning on the busy cursor to allow the system to change the
        cursor before we begin painting. This fixes a problem that
        was occuring only under GTK. Fixes RTbug #1840.


Revision 1236 - (view) (annotate) - [select for diffs]
Modified Wed Jun 18 15:29:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39254 byte(s)
Diff to previous 1221 , to selected 610
(MapCanvas.FitMapToWindow): This may be called
    during startup before a map has been created. Check if map is None
    before using it and do nothing if it is.


Revision 1221 - (view) (annotate) - [select for diffs]
Modified Tue Jun 17 15:24:45 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 39209 byte(s)
Diff to previous 1219 , to selected 610
(MapCanvas.__init__): New instance variable
        current_map_proj to remember the current map projection so that
        when the projection changes we know what the previous projection
        was.
(MapCanvas.SetMap): Unsubscribe and subscribe to
        LAYER_PROJECTION_CHANGED events.
(MapCanvas.projection_changed): Split into two methods that respond
        to map and layer projection changes.
(MapCanvas.map_projection_changed): New. Takes the current view and
        projects it using the new projection. This does not cause the
        map to be redrawn at full extent.
(MapCanvas.layer_projection_changed): New. Cause a redraw which
        will draw each layer in its new projection.


Revision 1219 - (view) (annotate) - [select for diffs]
Modified Mon Jun 16 17:42:54 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 38063 byte(s)
Diff to previous 1111 , to selected 610
Update to the layer interface: Direct access to the table,
shapetable, shapefile and filename attributes is now actively
deprecated by issuing deprecation warnings for all places where
this happens.

* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
to the instance variables table, shapetable, shapefile and
filename via __getattr__ so that we can issue a deprecation
warning.
(Layer.SetShapeStore): Don't set the deprecated instance variables
any more
(Layer.SetShapeStore): Don't use deprecated layer instance
variables
(Layer.Destroy): No need to explicitly remove the instance
variables any more
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
instance variables

* Thuban/UI/classgen.py (ClassGenDialog.__init__)
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
use deprecated layer instance variables

* Thuban/UI/classifier.py (Classifier.__init__): Don't use
deprecated layer instance variables

* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
instance variables

* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
deprecated layer instance variables

* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
deprecated layer instance variables

* Thuban/Model/save.py (SessionSaver.write_layer): Don't use
deprecated layer instance variables

* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
(MapRenderer.polygon_render_param): Don't use deprecated layer instance
variables

* test/runtests.py (main): Turn Thuban's deprecation warnings into
errors so that they're cought by the tests

* test/test_load.py (TestSingleLayer.test): Don't use deprecated
layer instance variables


Revision 1111 - (view) (annotate) - [select for diffs]
Modified Fri May 30 09:54:48 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 37875 byte(s)
Diff to previous 1105 , to selected 610
(MapCanvas.set_view_transform): Limit the
maximum and minimum scale factors.


Revision 1105 - (view) (annotate) - [select for diffs]
Modified Fri May 30 06:30:15 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 36423 byte(s)
Diff to previous 1035 , to selected 610
(MapCanvas.OnPaint): Wrap code
        with try/finally. Fixes RTBug #1904.
(MapCanvas.FitSelectedToWindow): If a single point is selected
        simply center it on the display. Fixes RTBug #1849.


Revision 1035 - (view) (annotate) - [select for diffs]
Modified Mon May 26 17:03:08 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 36144 byte(s)
Diff to previous 967 , to selected 610
Replace the true/false of wxWindows by True/False of Python 2.2.1.


Revision 967 - (view) (annotate) - [select for diffs]
Modified Wed May 21 17:24:54 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 36150 byte(s)
Diff to previous 940 , to selected 610
 Added checks against if scale == 0. This
        is a serious problem that can occur when an image without
        geo data is loading and causes the map projection bounds to
        go to infinity. Right now, the solution is to simply try
        to recover.


Revision 940 - (view) (annotate) - [select for diffs]
Modified Tue May 20 15:25:33 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 35965 byte(s)
Diff to previous 926 , to selected 610
(MapCanvas.set_view_transform): Try to limit
        how small the scale can get. This still needs more testing.


Revision 926 - (view) (annotate) - [select for diffs]
Modified Mon May 19 12:09:01 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 35852 byte(s)
Diff to previous 910 , to selected 610
Bugfix


Revision 910 - (view) (annotate) - [select for diffs]
Modified Fri May 16 16:23:43 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 35859 byte(s)
Diff to previous 883 , to selected 610
(MapPrintout.__init__): Enhanced parameter set to fullfil information
	needed for PrinterRenderer.
(MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
(MapCanvas.Print): Adapted to new MapPrintout.
(OutputTransform): General calculations to transform from canvas
	coordinates to export/printing devices.


Revision 883 - (view) (annotate) - [select for diffs]
Modified Fri May 9 16:34:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 32108 byte(s)
Diff to previous 855 , to selected 610
(MapCanvas): Delegate "SelectedShapes" so the table view can call it.


Revision 855 - (view) (annotate) - [select for diffs]
Modified Wed May 7 18:24:27 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 32052 byte(s)
Diff to previous 831 , to selected 610
(MapCanvas.set_view_transform): Issue SCALE_CHANGED.


Revision 831 - (view) (annotate) - [select for diffs]
Modified Tue May 6 12:07:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 31973 byte(s)
Diff to previous 824 , to selected 610
(MapCanvas): Added delegated method HasSelectedShapes.
(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
        shapes on the canvas using the map projection (if any).


Revision 824 - (view) (annotate) - [select for diffs]
Modified Tue May 6 08:09:27 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 31505 byte(s)
Diff to previous 822 , to selected 610
(MapCanvas.FitLayerToWindow): The bbox rectangle should be fit into the
        window whether or not the map has a projection.


Revision 822 - (view) (annotate) - [select for diffs]
Modified Mon May 5 18:20:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 31512 byte(s)
Diff to previous 799 , to selected 610
(MapCanvas.FitLayerToWindow): New. Centers and
        scales the given layer on the canvas using the map projection.


Revision 799 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 17:02:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30559 byte(s)
Diff to previous 789 , to selected 610
(MapCanvas.OnPaint): Add a try/except block
        around the redraw routine to try to catch problems that the user
        may create by selecting invalid projections for the data set and
        map. Clears the display if there are any problems and prints the
        error.
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
        rectangle.


Revision 789 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 11:06:00 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30294 byte(s)
Diff to previous 610
Fix some typos.


Revision 610 - (view) (annotate) - [selected]
Modified Fri Apr 4 13:56:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30294 byte(s)
Diff to previous 565
Rename Color.None to Color.Transparent.


Revision 565 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 11:07:40 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30280 byte(s)
Diff to previous 551 , to selected 610
(MapCanves.SetMap): Listen for LAYER_CHANGED, not LAYER_LEGEND_CHANGED,messages.


Revision 551 - (view) (annotate) - [select for diffs]
Modified Thu Mar 20 09:45:33 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30294 byte(s)
Diff to previous 535 , to selected 610
Use new message names.


Revision 535 - (view) (annotate) - [select for diffs]
Modified Fri Mar 14 20:42:18 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 30286 byte(s)
Diff to previous 469 , to selected 610
Implement multiple selected shapes

* Thuban/UI/selection.py: New module with a class to represent the
selection.

* Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
these unused messages

* Thuban/UI/application.py (ThubanApplication.OnInit)
(ThubanApplication.OnExit, ThubanApplication.SetSession): The
interactor is gone now.
(ThubanApplication.CreateMainWindow): There is no interactor
anymore so we pass None as the interactor argument for now for
compatibility.

* Thuban/UI/view.py (MapCanvas.delegated_messages)
(MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
Unsubscribe, delegate messages according to the delegated_messages
class variable.
(MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
attributes from instance variables as described with the
delegated_methods class variable.
(MapCanvas.__init__): New instance variable selection holding the
current selection
(MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
pass them on to the renderer
(MapCanvas.SetMap): Clear the selection when a different map is
selected.
(MapCanvas.shape_selected): Simple force a complete redraw. The
selection class now takes care of only issueing SHAPES_SELECTED
messages when the set of selected shapes actually does change.
(MapCanvas.SelectShapeAt): The selection is now managed in
self.selection

* Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
(MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
Unsubscribe, delegate messages according to the delegated_messages
class variable.
(MainWindow.delegated_methods, MainWindow.__getattr__): Get some
attributes from instance variables as described with the
delegated_methods class variable.
(MainWindow.__init__): The interactor as ivar is gone. The
parameter is still there for compatibility. The selection messages
now come from the canvas.
(MainWindow.current_layer, MainWindow.has_selected_layer):
Delegate to the the canvas.
(MainWindow.LayerShowTable, MainWindow.Classify)
(MainWindow.identify_view_on_demand): The dialogs don't need the
interactor parameter anymore.

* Thuban/UI/tableview.py (TableFrame.__init__)
(LayerTableFrame.__init__, LayerTableFrame.OnClose)
(LayerTableFrame.row_selected): The interactor is gone. It's job
from the dialog's point of view is now done by the mainwindow,
i.e. the parent. Subscribe to SHAPES_SELECTED instead
of SELECTED_SHAPE

* Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
is gone. It's job from the dialog's point of view is now done by
the mainwindow, i.e. the parent.

* Thuban/UI/classifier.py (Classifier.__init__): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.

* Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.
(SessionTreeCtrl.__init__): New parameter mainwindow which is
stored as self.mainwindow. The mainwindow is need so that the tree
can still subscribe to the selection messages.
(SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
(SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
selection is now accessible through the mainwindow. Subscribe to
SHAPES_SELECTED instead of SELECTED_SHAPE

* Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
SHAPES_SELECTED message now.
(IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
so deal with multiple shapes
(IdentifyView.__init__, IdentifyView.OnClose): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.

* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
selected_shape parameter and ivar to selected_shapes. It's now a
list of shape ids.
(MapRenderer.draw_label_layer): Deal with multiple selected
shapes. Rearrange the code a bit so that the setup and shape type
distinctions are only executed once.


Revision 469 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 18:19:25 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28761 byte(s)
Diff to previous 433 , to selected 610
Function name changes.


Revision 433 - (view) (annotate) - [select for diffs]
Modified Mon Feb 24 18:47:49 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28758 byte(s)
Diff to previous 404 , to selected 610
(MapCanvas.find_shape_at): Use method calls
        instead of accessing now non-existent class variables.


Revision 404 - (view) (annotate) - [select for diffs]
Modified Fri Feb 14 17:40:26 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28598 byte(s)
Diff to previous 356 , to selected 610
(MapCanvas.OnLeftUp): Make sure that the
dragging flag is always set to 0 even when the tool implementation
raises an exception


Revision 356 - (view) (annotate) - [select for diffs]
Modified Mon Dec 9 10:32:15 2002 UTC (22 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28534 byte(s)
Diff to previous 303 , to selected 610
(MapCanvas.SelectTool): New method to select
the tool to avoid direct assignments to instance variables
(MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
(MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
change the tool


Revision 303 - (view) (annotate) - [select for diffs]
Modified Mon Sep 2 16:47:53 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28296 byte(s)
Diff to previous 301 , to selected 610
* Thuban/UI/view.py: Get rid of the idle redraw. This is done by
wxWindows already and our implementation doesn't work correctly
with wxGTK 2.3:
(MapCanvas.__init__): Remove the instance variable
(MapCanvas.OnPaint): Always call do_redraw when there's a map to
be drawin
(MapCanvas.OnIdle): Removed.


Revision 301 - (view) (annotate) - [select for diffs]
Modified Mon Sep 2 15:59:11 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28742 byte(s)
Diff to previous 296 , to selected 610
(MapCanvas.unprojected_rect_around_point): Add
a parameter to determine the size of the rectangle.
(MapCanvas.find_shape_at): Create the box around the point on a
layer by layer basis and make the size depend on the shape type.
This solves a problem with the selection of point shapes at the
border of the layer's bounding box


Revision 296 - (view) (annotate) - [select for diffs]
Modified Fri Aug 30 16:10:45 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28182 byte(s)
Diff to previous 295 , to selected 610
* Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
(MapCanvas.do_redraw): Get rid of the unused update_region
instance variable


Revision 295 - (view) (annotate) - [select for diffs]
Modified Fri Aug 30 10:39:17 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28662 byte(s)
Diff to previous 293 , to selected 610
Add some more doc-strings.


Revision 293 - (view) (annotate) - [select for diffs]
Modified Fri Aug 30 10:18:50 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 28035 byte(s)
Diff to previous 288 , to selected 610
Add/update some doc-strings.


Revision 288 - (view) (annotate) - [select for diffs]
Modified Thu Aug 29 13:31:43 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27693 byte(s)
Diff to previous 261 , to selected 610
(ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
Handle degenrate rectangles.


Revision 261 - (view) (annotate) - [select for diffs]
Modified Thu Aug 15 17:44:33 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27228 byte(s)
Diff to previous 246 , to selected 610
(MapCanvas.OnLeftUp): Only release the mouse
when we have actually captured it.


Revision 246 - (view) (annotate) - [select for diffs]
Modified Mon Jul 29 13:38:04 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27224 byte(s)
Diff to previous 239 , to selected 610
(MapCanvas.find_shape_at): Change the
selected_layer parameter to searched_layer which is the layer to
search in.
(MapCanvas.SelectShapeAt): New parameter layer to restrict the
search to that layer. Return the selected layer and shape.


Revision 239 - (view) (annotate) - [select for diffs]
Modified Wed Jul 24 17:15:54 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27198 byte(s)
Diff to previous 176 , to selected 610
(ZoomOutTool.MouseUp): Use the correct
x-coordinate in case of simple clicks


Revision 176 - (view) (annotate) - [select for diffs]
Modified Wed May 15 13:38:49 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27202 byte(s)
Diff to previous 174 , to selected 610
remove some debug prints


Revision 174 - (view) (annotate) - [select for diffs]
Modified Wed May 15 13:30:00 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 27308 byte(s)
Diff to previous 159 , to selected 610
	* Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
	necessary.
	(MapCanvas.__init__): New instance variables, last_selected_layer
	and last_selected_shape to determine how the selection has
	changed.


Revision 159 - (view) (annotate) - [select for diffs]
Modified Wed May 8 13:46:15 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 26153 byte(s)
Diff to previous 149 , to selected 610
	* Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
	maintains to redraw the window during a drag.
	(MapCanvas.unprojected_rect_around_point): New method to determine
	a small region around a point for hit-testing.
	(MapCanvas.find_shape_at): Only test the shapes in a small region
	around the point.


Revision 149 - (view) (annotate) - [select for diffs]
Modified Tue May 7 16:41:07 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 25257 byte(s)
Diff to previous 145 , to selected 610
	* Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
	as update_region to the renderer.


Revision 145 - (view) (annotate) - [select for diffs]
Modified Tue May 7 14:58:05 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 25060 byte(s)
Diff to previous 125 , to selected 610
	* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
	update_region for the update region.
	(MapCanvas.OnPaint): Maintain the update region
	(MapCanvas.do_redraw): Pass the bounding box of the update_region
	to the renderer when drawing the bitmap. Reset the update_region.


Revision 125 - (view) (annotate) - [select for diffs]
Modified Thu May 2 18:55:33 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 24632 byte(s)
Diff to previous 122 , to selected 610
	* Thuban/UI/view.py: Keep the temporary bitmap used during drawing
	around to speed up most redraws:
	(MapCanvas.__init__): New instance variable bitmap which holds the
	bitmap
	(MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
	self.bitmap to draw.
	(MapCanvas.full_redraw): New method to force a full redraw
	including the bitmap
	(MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
	make sure the bitmap is redrawn.
	(MapCanvas.projection_changed, MapCanvas.set_view_transform,
	MapCanvas.shape_selected): Call full_redraw instead of readraw to
	make sure the bitmap is redrawn.
	(MapCanvas.OnSize): New method to handle size events so that the
	bitmap can be redrawn.


Revision 122 - (view) (annotate) - [select for diffs]
Modified Mon Apr 29 18:04:54 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 22873 byte(s)
Diff to previous 78 , to selected 610
	* Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
	(MapCanvas.__del__): Implement because Publisher.__del__ has to be
	called.
	(MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
	current_position
	(MapCanvas.set_current_position): New method to set
	current_position. Issue a VIEW_POSITION event
	(MapCanvas.CurrentPosition): New public method to return the value
	of current_position. Should be called when the VIEW_POSITION event
	is processed.
	(MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
	Update the position.
	(MapCanvas.OnLeaveWindow): Set the position to None.


Revision 78 - (view) (annotate) - [select for diffs]
Modified Mon Feb 4 19:37:16 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 21534 byte(s)
Diff to previous 60 , to selected 610
	* Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
	layers by default. Easier to use than the previous default of only
	searching through the select layer which meant that if no layer
	was selected, you couldn't select a shape.


Revision 60 - (view) (annotate) - [select for diffs]
Modified Thu Sep 13 14:47:39 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 21508 byte(s)
Diff to previous 57 , to selected 610
	(MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
	index, i.e. reversed drawing order) so that objects appearing to
	be in from of others are selected first. This is probably mostly
	relevant for point shapes where the symbols used may overlap


Revision 57 - (view) (annotate) - [select for diffs]
Modified Thu Sep 13 13:55:33 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 21460 byte(s)
Diff to previous 45 , to selected 610
	* Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
	idle time when there actually is something to draw. If there's
	nothing to draw simply clear the window
	(MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
	(MapCanvas.SetMap): force a redraw in all cases because
	FitMapToWindow doesn't always do it.
	(MapCanvas.ZoomFactor): Add an optional parameter, center, to
	specify the point to move into the center of the window
	(ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
	dragged, zoon in/out by a factor of 2


Revision 45 - (view) (annotate) - [select for diffs]
Modified Fri Sep 7 15:00:21 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 19538 byte(s)
Diff to previous 43 , to selected 610
	(MapCanvas.FitRectToWindow): If the rect has zero with or zero
	height do nothing (avoids zero division errors)


Revision 43 - (view) (annotate) - [select for diffs]
Modified Fri Sep 7 11:55:51 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 19431 byte(s)
Diff to previous 23 , to selected 610
	* Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
	that can limit the search to the currently selected layer.
	(MapCanvas.SelectShapeAt): Make sure that the currently selected
	layer stays selected even when no shape is found


Revision 23 - (view) (annotate) - [select for diffs]
Modified Wed Sep 5 13:35:22 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 18435 byte(s)
Diff to previous 6 , to selected 610
New argument, interactor.


Revision 6 - (view) (annotate) - [select for diffs]
Added Tue Aug 28 15:41:52 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/view.py
File length: 18452 byte(s)
Diff to selected 610
import all the source files


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26