|
From: <joh...@ie...> - 2000-02-25 23:32:32
|
Patch: vhclmaps-000226-johnston-010
For: vhclmaps-0.7.4
Author: joh...@us...
This is an intermediate patch to vhclmaps-0.7.4. To apply, cd to the
top-level directory of the vhclmaps source tree (the directory with src
and config subdirs), and apply like this:
patch -p0 <ThisFile
Summary of Changes:
- change parent of MapKit from OverlayKit to FrameKit.
- enable the AreaFeature tool in utmviewer, but beware, it has a bug.
- setup a command interpreter in the texteditor at the bottom of the
vhclviewer screen.
Index: MapUnidraw/mapeditor.c
diff -c MapUnidraw/mapeditor.c:1.1 MapUnidraw/mapeditor.c:1.2
*** MapUnidraw/mapeditor.c:1.1 Mon Aug 2 13:53:06 1999
--- src/MapUnidraw/mapeditor.c Sat Feb 26 03:30:44 2000
***************
*** 115,120 ****
--- 115,122 ----
_texteditor = nil;
if (!comp) comp = new MapIdrawComp((const char*) nil, nil);
_terp = new ComTerpServ();
+ _terp->add_defaults();
+ AddCommands(_terp);
add_comterp("MapEditor", _terp);
_overlay_kit->Init(comp, name);
InitFrame();
Index: MapUnidraw/mapkit.c
diff -c MapUnidraw/mapkit.c:1.2 MapUnidraw/mapkit.c:1.3
*** MapUnidraw/mapkit.c:1.2 Thu Feb 10 04:32:30 2000
--- src/MapUnidraw/mapkit.c Sat Feb 26 03:30:44 2000
***************
*** 189,195 ****
MapKit* MapKit::_mapkit = nil;
MapKit::MapKit ()
! :OverlayKit()
{
_projnameview = nil;
}
--- 189,195 ----
MapKit* MapKit::_mapkit = nil;
MapKit::MapKit ()
! :FrameKit()
{
_projnameview = nil;
}
Index: MapUnidraw/mapkit.h
diff -c MapUnidraw/mapkit.h:1.1 MapUnidraw/mapkit.h:1.2
*** MapUnidraw/mapkit.h:1.1 Mon Aug 2 13:53:07 1999
--- src/MapUnidraw/mapkit.h Sat Feb 26 03:30:44 2000
***************
*** 28,34 ****
#ifndef map_kit_h
#define map_kit_h
! #include <OverlayUnidraw/ovkit.h>
#include <InterViews/_enter.h>
--- 28,34 ----
#ifndef map_kit_h
#define map_kit_h
! #include <FrameUnidraw/framekit.h>
#include <InterViews/_enter.h>
***************
*** 36,42 ****
class NameView;
class ThemeChooser;
! class MapKit : public OverlayKit {
public:
MapKit();
--- 36,42 ----
class NameView;
class ThemeChooser;
! class MapKit : public FrameKit {
public:
MapKit();
Index: UtmUnidraw/utmkit.c
diff -c UtmUnidraw/utmkit.c:1.1 UtmUnidraw/utmkit.c:1.2
*** UtmUnidraw/utmkit.c:1.1 Mon Aug 2 13:53:25 1999
--- src/UtmUnidraw/utmkit.c Sat Feb 26 03:30:46 2000
***************
*** 1,4 ****
--- 1,5 ----
/*
+ * Copyright 2000 IET Inc.
* Copyright 1997-1999 Vectaport Inc.
* Copyright 1994, 1995 Vectaport Inc., Cartoactive Systems
* Copyright 1993 David B. Hollenbeck
***************
*** 131,136 ****
--- 132,140 ----
return _utmkit;
}
+ #define LINEFEATURE_TOOL
+ #define AREAFEATURE_TOOL
+
Glyph* UtmKit::MakeToolbar() {
WidgetKit& kit = *WidgetKit::instance();
const LayoutKit& layout = *LayoutKit::instance();
***************
*** 160,167 ****
#if 0
ToolButton* prtbutton;
#endif
ToolButton* lftbutton;
! #if 0
ToolButton* aftbutton;
#endif
ToolButton* geolog;
--- 164,173 ----
#if 0
ToolButton* prtbutton;
#endif
+ #if defined(LINEFEATURE_TOOL)
ToolButton* lftbutton;
! #endif
! #if defined(AREAFEATURE_TOOL)
ToolButton* aftbutton;
#endif
ToolButton* geolog;
***************
*** 184,191 ****
#if 0
Glyph* prt = kit.label("PickRoute");
#endif
Glyph* lft = kit.label("LineFeature");
! #if 0
Glyph* aft = kit.label("AreaFeature");
#endif
Glyph* geologl = geolog_cmd ? kit.label("GeoLog") : nil;
--- 190,199 ----
#if 0
Glyph* prt = kit.label("PickRoute");
#endif
+ #if defined(LINEFEATURE_TOOL)
Glyph* lft = kit.label("LineFeature");
! #endif
! #if defined(AREAFEATURE_TOOL)
Glyph* aft = kit.label("AreaFeature");
#endif
Glyph* geologl = geolog_cmd ? kit.label("GeoLog") : nil;
***************
*** 216,224 ****
maxwidth = Math::max((prt->request(req), req.x_requirement().natural()),
maxwidth);
#endif
maxwidth = Math::max((lft->request(req), req.x_requirement().natural()),
maxwidth);
! #if 0
maxwidth = Math::max((aft->request(req), req.x_requirement().natural()),
maxwidth);
#endif
--- 224,234 ----
maxwidth = Math::max((prt->request(req), req.x_requirement().natural()),
maxwidth);
#endif
+ #if defined(LINEFEATURE_TOOL)
maxwidth = Math::max((lft->request(req), req.x_requirement().natural()),
maxwidth);
! #endif
! #if defined(AREAFEATURE_TOOL)
maxwidth = Math::max((aft->request(req), req.x_requirement().natural()),
maxwidth);
#endif
***************
*** 281,290 ****
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(prt)), tg));
#endif
vb->append(lftbutton = MakeTool(new LineFeatureTool(new ControlInfo("LineFeature")),
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(lft)), tg));
! #if 0
vb->append(aftbutton = MakeTool(new AreaFeatureTool(new ControlInfo("AreaFeature")),
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(aft)), tg));
--- 291,302 ----
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(prt)), tg));
#endif
+ #if defined(LINEFEATURE_TOOL)
vb->append(lftbutton = MakeTool(new LineFeatureTool(new ControlInfo("LineFeature")),
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(lft)), tg));
! #endif
! #if defined(AREAFEATURE_TOOL)
vb->append(aftbutton = MakeTool(new AreaFeatureTool(new ControlInfo("AreaFeature")),
layout.overlay(layout.hcenter(layout.hspace(maxwidth)),
layout.hcenter(aft)), tg));
***************
*** 292,302 ****
_toolbars->append(vb);
! #ifdef HAVE_ACE
! vb = layout.vbox(7 + 3*(losserv_enable!=0) + geolog_cmd!=0);
! #else
! vb = layout.vbox(5 + geolog_cmd!=0);
! #endif
vb->append(magnify);
vb->append(mapselect);
vb->append(inspect);
--- 304,310 ----
_toolbars->append(vb);
! vb = layout.vbox();
vb->append(magnify);
vb->append(mapselect);
vb->append(inspect);
***************
*** 318,325 ****
#if 0
vb->append(prtbutton);
#endif
vb->append(lftbutton);
! #if 0
vb->append(aftbutton);
#endif
_toolbars->append(vb);
--- 326,335 ----
#if 0
vb->append(prtbutton);
#endif
+ #if defined(LINEFEATURE_TOOL)
vb->append(lftbutton);
! #endif
! #if defined(AREAFEATURE_TOOL)
vb->append(aftbutton);
#endif
_toolbars->append(vb);
Index: VhclUnidraw/vhclkit.c
diff -c VhclUnidraw/vhclkit.c:1.1 VhclUnidraw/vhclkit.c:1.2
*** VhclUnidraw/vhclkit.c:1.1 Mon Aug 2 13:53:53 1999
--- src/VhclUnidraw/vhclkit.c Sat Feb 26 03:30:53 2000
***************
*** 157,163 ****
--- 157,169 ----
}
void VhclKit::InitLayout(const char* name) {
+ boolean save_set_button_flag = _set_button_flag;
+ boolean save_clr_button_flag = _clr_button_flag;
+ _set_button_flag = false;
+ _clr_button_flag = false;
FrameKit::InitLayout(this, name);
+ _set_button_flag = save_set_button_flag;
+ _clr_button_flag = save_clr_button_flag;
}
Glyph* VhclKit::MakeStates() {
*** /dev/null Sat Feb 26 03:30:55 PST 2000
--- patches/vhclmaps-000226-johnston-010
*************** patches/vhclmaps-000226-johnston-010
*** 0 ****
--- 1 ----
+ vhclmaps-000226-johnston-010
|