+ All Categories
Home > Documents > MAP API Reference -...

MAP API Reference -...

Date post: 28-Aug-2018
Category:
Upload: volien
View: 224 times
Download: 0 times
Share this document with a friend
70
® Map API Reference
Transcript

®

Map APIReference

Map APIReference

Summary of Changes

Version Date Reason/Rational Nature of Changes

E1 Jan 1998 New Product First Edition

E2 03/12/98 Update

Incorporated changes requested by project programmer; revised format throughout to match SDK guidelines; removed Beta legend watermark from cover.

9032524 E2i

Notice

Cabletron Systems reserves the right to make changes in specifications and other information contained in this document without prior notice. The reader should in all cases consult Cabletron Systems to determine whether any such changes have been made.

The hardware, firmware, or software described in this manual is subject to change without notice.

IN NO EVENT SHALL CABLETRON SYSTEMS BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATED TO THIS MANUAL OR THE INFORMATION CONTAINED IN IT, EVEN IF CABLETRON SYSTEMS HAS BEEN ADVISED OF, KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF SUCH DAMAGES.

Cabletron Systems makes no representations or warranties to the effect that the Licensed Software is virus-free.

Copyright © March, 1998, by Cabletron Systems, Inc. All rights reserved.

Printed in the United States of America.

Order Number: 9032524 E2

Cabletron Systems, Inc.P.O. Box 5005Rochester, NH 03866-5005

SPECTRUM

, the

SPECTRUM

IMT/VNM

logo,

DCM

,

IMT

, and

VNM

are registered trademarks, and

SpectroGRAPH

,

SpectroSERVER

,

Inductive Modeling Technology

,

Device Communications Manager

, and

Virtual Network Machine

are trademarks of Cabletron Systems, Inc.

C++

is a trademark of American Telephone and Telegraph, Inc.

UNIX

is a trademark of The Open Group.

OSF/Motif

and

Motif

are trademarks of the Open Software Foundation, Inc.

X Window System

is a trademark of The Open Group.

Ethernet

is a trademark of Xerox Corporation.

Map APIii Reference

Virus Disclaimer

Cabletron has tested its software with current virus checking technologies. However, because no anti-virus system is 100% reliable, we strongly caution you to write protect and then verify that the Licensed Software, prior to installing it, is virus-free with an anti-virus system in which you have confidence.

Restricted Rights Notice

(Applicable to licenses to the United States Government only.)

1. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013.

Cabletron Systems, Inc., 35 Industrial Way, Rochester, New Hampshire 03866-5005.

2. (a) This computer software is submitted with restricted rights. It may not be used, reproduced, or disclosed by the Government except as provided in paragraph (b) of this Notice or as otherwise expressly stated in the contract.

(b) This computer software may be:

(1) Used or copied for use in or with the computer or computers for which it was acquired, including use at any Government installation to which such computer or computers may be transferred;

(2) Used or copied for use in a backup computer if any computer for which it was acquired is inoperative;

(3) Reproduced for safekeeping (archives) or backup purposes;

(4) Modified, adapted, or combined with other computer software, provided that the modified, combined, or adapted portions of the derivative software incorporating restricted computer software are made subject to the same restricted rights;

(5) Disclosed to and reproduced for use by support service contractors in accordance with subparagraphs (b) (1) through (4) of this clause, provided the Government makes such disclosure or reproduction subject to these restricted rights; and

(6) Used or copied for use in or transferred to a replacement computer.

(c) Notwithstanding the foregoing, if this computer software is published copyrighted computer software, it is licensed to the Government, without disclosure prohibitions, with the minimum rights set forth in paragraph (b) of this clause.

(d) Any other rights or limitations regarding the use, duplication, or disclosure of this computer software are to be expressly stated in, or incorporated in, the contract.

(e) This Notice shall be marked on any reproduction of this computer software, in whole or in part.

9032524 E2iii

Contents

Preface

Prerequisites for Readers of this Reference ........................................................................ ixHow to Use This Guide...........................................................................................................xTypographical Conventions....................................................................................................xOther Conventions..................................................................................................................xQuestions about SPECTRUM Documentation .....................................................................xCsAnnBoxmac...................................................................................................................... 11

CsAnnBox::CsAnnBox .................................................................................................. 11CsAnnBox::CsAnnBox .................................................................................................. 11CsAnnBox::CsAnnBox .................................................................................................. 11CsAnnBox::operator=.................................................................................................... 12CsAnnBox::GetBgColor................................................................................................. 12CsAnnBox::SetBgColor ................................................................................................. 12CsAnnBox::GetFgColor................................................................................................. 12CsAnnBox::SetFgColor ................................................................................................. 12CsAnnBox::GetLineStyle .............................................................................................. 12CsAnnBox::SetLineStyle............................................................................................... 12CsAnnBox::GetLineThickness...................................................................................... 13CsAnnBox::SetLineThickness ...................................................................................... 13CsAnnBox::GetLowerRightX........................................................................................ 13CsAnnBox::GetLowerRightY........................................................................................ 13CsAnnBox::SetLowerRightX ........................................................................................ 13CsAnnBox::SetLowerRightY ........................................................................................ 13CsAnnBox::GetUpperLeftX .......................................................................................... 13CsAnnBox::GetUpperLeftY .......................................................................................... 13CsAnnBox::SetUpperLeftX........................................................................................... 13CsAnnBox::SetUpperLeftY........................................................................................... 13CsAnnBox::MakeDuplicate........................................................................................... 13CsAnnBox::Pack ............................................................................................................ 14CsAnnBox::PackedLength ............................................................................................ 14CsAnnBox::Print ........................................................................................................... 14

CsAnnCircle ......................................................................................................................... 15CsAnnCircle::CsAnnCircle ........................................................................................... 15CsAnnCircle::CsAnnCircle ........................................................................................... 15CsAnnCircle::CsAnnCircle ........................................................................................... 15CsAnnCircle::operator= ................................................................................................ 16CsAnnCircle::GetBgColor ............................................................................................. 16CsAnnCircle::SetBgColor.............................................................................................. 16CsAnnCircle::GetFgColor ............................................................................................. 16CsAnnCircle::SetFgColor.............................................................................................. 16CsAnnCircle::GetLineStyle........................................................................................... 16CsAnnCircle::SetLineStyle ........................................................................................... 16CsAnnCircle::GetLineThickness .................................................................................. 17

Contents Map APIiv Reference

CsAnnCircle::SetLineThickness ................................................................................... 17CsAnnCircle::GetLowerRightX..................................................................................... 17CsAnnCircle::GetLowerRightY..................................................................................... 17CsAnnCircle::SetLowerRightX ..................................................................................... 17CsAnnCircle::SetLowerRightY ..................................................................................... 17CsAnnCircle::GetUpperLeftX ....................................................................................... 17CsAnnCircle::GetUpperLeftY ....................................................................................... 17CsAnnCircle::SetUpperLeftX........................................................................................ 17CsAnnCircle::SetUpperLeftY........................................................................................ 17CsAnnCircle::MakeDuplicate........................................................................................ 17CsAnnCircle::Pack ......................................................................................................... 18CsAnnCircle::PackedLength ......................................................................................... 18CsAnnCircle::Print ........................................................................................................ 18

CsAnnLine............................................................................................................................ 19CsAnnLine::CsAnnLine................................................................................................. 19CsAnnLine::CsAnnLine................................................................................................. 19CsAnnLine::CsAnnLine................................................................................................. 19CsAnnLine::CsAnnLine................................................................................................. 20CsAnnLine::operator= ................................................................................................... 20CsAnnLine::GetBgColor................................................................................................ 20CsAnnLine::SetBgColor ................................................................................................ 20CsAnnLine::GetEndX.................................................................................................... 20CsAnnLine::GetEndY.................................................................................................... 20CsAnnLine::SetEndX .................................................................................................... 20CsAnnLine::SetEndY .................................................................................................... 20CsAnnLine::GetFgColor ................................................................................................ 21CsAnnLine::SetFgColor................................................................................................. 21CsAnnLine::GetLineThickness ..................................................................................... 21 CsAnnLine::SetLineThickness..................................................................................... 21CsAnnLine::GetStartX .................................................................................................. 21CsAnnLine::GetStartY .................................................................................................. 21CsAnnLine::SetStartX................................................................................................... 21CsAnnLine::SetStartY................................................................................................... 21CsAnnLine::MakeDuplicate.......................................................................................... 21CsAnnLine::Pack ........................................................................................................... 21CsAnnLine::PackedLength............................................................................................ 22CsAnnLine::Print........................................................................................................... 22CsAnnLine::GetLineStyle ............................................................................................. 22CsAnnLine::SetLineStyle.............................................................................................. 22

CsAnnotation........................................................................................................................ 23CsAnnotation::CsAnnotation ........................................................................................ 23CsAnnotation::~CsAnnotation ...................................................................................... 23CsAnnotation::MakeDuplicate...................................................................................... 23CsAnnotation::Pack ....................................................................................................... 23CsAnnotation::PackedLength ....................................................................................... 24CsAnnotation::Print ...................................................................................................... 24

CsAnnotationList ................................................................................................................. 25CsAnnotationList::CsAnnotationList ........................................................................... 25CsAnnotationList::CsAnnotationList ........................................................................... 25CsAnnotationList::CsAnnotationList ........................................................................... 26CsAnnotationList::~CsAnnotationList......................................................................... 26CsAnnotationList::operator= ........................................................................................ 26CsAnnotationList::operator[] ........................................................................................ 26CsAnnotationList::Clear ............................................................................................... 26

9032524 E2 Contentsv

CsAnnotationList::Entries............................................................................................ 26CsAnnotationList::Get .................................................................................................. 26CsAnnotationList::Insert .............................................................................................. 27CsAnnotationList::Pack ................................................................................................ 27CsAnnotationList::PackBuffer...................................................................................... 27CsAnnotationList::PackedLength ................................................................................ 27CsAnnotationList::Remove ........................................................................................... 28

CsAnnText............................................................................................................................ 29CsAnnText::CsAnnText ................................................................................................ 29CsAnnText::CsAnnText ................................................................................................ 29CsAnnText::CsAnnText ................................................................................................ 29CsAnnText::CsAnnText ................................................................................................ 30CsAnnText::~CsAnnText .............................................................................................. 30CsAnnText::operator=................................................................................................... 30CsAnnText::GetBgColor................................................................................................ 30CsAnnText::SetBgColor ................................................................................................ 30CsAnnText::GetDrawBackground................................................................................ 30CsAnnText::SetDrawBackground ................................................................................ 30CsAnnText::GetFgColor................................................................................................ 31CsAnnText::SetFgColor ................................................................................................ 31CsAnnText::GetPosX..................................................................................................... 31CsAnnText::SetPosX ..................................................................................................... 31CsAnnText::GetPosY..................................................................................................... 31CsAnnText::SetPosY ..................................................................................................... 31CsAnnText::GetTextWidth ........................................................................................... 31CsAnnText::SetTextWidth ............................................................................................ 31CsAnnText::GetTextHeight .......................................................................................... 31CsAnnText::SetTextHeight........................................................................................... 31CsAnnText::MakeDuplicate.......................................................................................... 31CsAnnText::Pack ........................................................................................................... 32CsAnnText::PackedLength ........................................................................................... 32CsAnnText::Print .......................................................................................................... 32char * CsAnnText::GetFontName ................................................................................ 32CsAnnText::SetFontName ............................................................................................ 32char * CsAnnText::GetTextString ................................................................................ 32CsAnnText::SetTextString............................................................................................ 32CsAnnText::GetFontAscent .......................................................................................... 33CsAnnText::SetFontAscent........................................................................................... 33

CsConnectionList................................................................................................................. 34CsConnectionList::operator=........................................................................................ 34CsConnectionList::get_destination_index ................................................................... 34CsConnectionList::get_source_index............................................................................ 34CsConnectionList::has_been_modified......................................................................... 35CsConnectionList::move_model.................................................................................... 35CsConnectionList::pack ................................................................................................ 35CsConnectionList::pack_buffer..................................................................................... 35CsConnectionList::packed_length ................................................................................ 36CsConnectionList::remove ............................................................................................ 36CsConnectionList::swap_source_and_destination ...................................................... 36

CsGroup ............................................................................................................................... 37CsGroup::CsGroup ........................................................................................................ 37CsGroup::~CsGroup ...................................................................................................... 37CsGroup::AddElement .................................................................................................. 37CsGroup::AddElements ................................................................................................ 37

Contents Map APIvi Reference

CsGroup::ClearGroup.................................................................................................... 37CsGroup::GetCount ....................................................................................................... 37CsGroup::GetElement ................................................................................................... 38

CsGroupElement.................................................................................................................. 39CsGroupElement::CsGroupElement ............................................................................ 39CsGroupElement::~CsGroupElement .......................................................................... 39CsGroupElement::GetHandle ....................................................................................... 39CsGroupElement::GetType ........................................................................................... 39CsGroupElement::SetHandle........................................................................................ 39CsGroupElement::SetType............................................................................................ 40

CsGroupList ......................................................................................................................... 41CsGroupList::CsGroupList ........................................................................................... 41CsGroupList::CsGroupList ........................................................................................... 41CsGroupList::CsGroupList ........................................................................................... 42CsGroupList::~CsGroupList ......................................................................................... 42CsGroupList::AddGroup................................................................................................ 42CsGroupList::ClearGroups............................................................................................ 42CsGroupList::GetCount................................................................................................. 42CsGroupList::GetGroup ................................................................................................ 42CsGroupList::GetGroup ................................................................................................ 42CsGroupList::Pack......................................................................................................... 43CsGroupList::PackBuffer .............................................................................................. 43CsGroupList::PackLength............................................................................................. 43CsGroupList::RemoveGroup ......................................................................................... 43

CsIIBList .............................................................................................................................. 44CsIIBList::operator=...................................................................................................... 44CsIIBList::add................................................................................................................ 44CsIIBList::find ............................................................................................................... 45CsIIBList::get_count...................................................................................................... 45CsIIBList::get_entry...................................................................................................... 45CsIIBList::get_model..................................................................................................... 45CsIIBList::get_type........................................................................................................ 45CsIIBList::get_type........................................................................................................ 45CsIIBList::has_been_modified ...................................................................................... 46CsIIBList::pack .............................................................................................................. 46CsIIBList::pack_buffer .................................................................................................. 46CsIIBList::packed_length.............................................................................................. 46CsIIBList::set_position.................................................................................................. 46CsIIBList::set_type........................................................................................................ 47

CsIIBListEntry..................................................................................................................... 48CsIIBListEntry::CsIIBListEntry.................................................................................. 48CsIIBListEntry::CsIIBListEntry.................................................................................. 48CsIIBListEntry::get_mh................................................................................................ 48CsIIBListEntry::get_mth .............................................................................................. 48CsIIBListEntry::get_type.............................................................................................. 49CsIIBListEntry::set_type .............................................................................................. 49CsIIBListEntry::get_xpos.............................................................................................. 49CsIIBListEntry::get_ypos.............................................................................................. 49CsIIBListEntry::set_xpos.............................................................................................. 49CsIIBListEntry::set_ypos.............................................................................................. 49CsIIBListEntry::pack .................................................................................................... 49CsIIBListEntry::packed_length.................................................................................... 49

CsPackedVib......................................................................................................................... 50CsPackedVib::CsPackedVib........................................................................................... 50

9032524 E2 Contentsvii

CsPackedVib::CsPackedVib .......................................................................................... 50CsPackedVib::~CsPackedVib ........................................................................................ 50CsPackedVib::AddConnection ...................................................................................... 50CsPackedVib::FindNextConnection ............................................................................. 51CsPackedVib::GetAnnotationList................................................................................. 51CsPackedVib::SetAnnotationList ................................................................................. 51CsPackedVib::GetConnList........................................................................................... 51CsPackedVib::SetConnList ........................................................................................... 51CsPackedVib::GetEditCount......................................................................................... 52CsPackedVib::SetEditCount ......................................................................................... 52CsPackedVib::GetGroupList......................................................................................... 52CsPackedVib::SetGroupList ......................................................................................... 52CsPackedVib::GetIibList............................................................................................... 52CsPackedVib::SetIibList ............................................................................................... 52CsPackedVib::GetRasterName..................................................................................... 52CsPackedVib::SetRasterName ..................................................................................... 52CsPackedVib::GetVdsWidth ......................................................................................... 53CsPackedVib::SetVdsWidth.......................................................................................... 53CsPackedVib::GetVdsHeight ........................................................................................ 53CsPackedVib::SetVdsHeight......................................................................................... 53CsPackedVib::GetXOffset ............................................................................................. 53CsPackedVib::SetXOffset.............................................................................................. 53CsPackedVib::GetYOffset ............................................................................................. 53CsPackedVib::SetYOffset .............................................................................................. 53CsPackedVib::GetZoomList .......................................................................................... 54CsPackedVib::SetZoomList........................................................................................... 54CsPackedVib::GetZoomScale ........................................................................................ 54CsPackedVib::SetZoomScale......................................................................................... 54CsPackedVib::IsDataValid ............................................................................................ 54CsPackedVib::IsUserConnection .................................................................................. 54CsPackedVib::MoveIcon................................................................................................ 54CsPackedVib::Pack........................................................................................................ 55CsPackedVib::PackBuffer ............................................................................................. 55CsPackedVib::PackedLength ........................................................................................ 55CsPackedVib::RemoveConnection ................................................................................ 56CsPackedVib::RemoveIcon............................................................................................ 56CsPackedVib::UnpackBuffer ........................................................................................ 56

CsTVIBInfo .......................................................................................................................... 57CsTVIBInfo::CsTVIBInfo.............................................................................................. 57CsTVIBInfo::~CsTVIBInfo............................................................................................ 57CsTVIBInfo::add_connection ........................................................................................ 57CsTVIBInfo::add_icon ................................................................................................... 58CsTVIBInfo::create_conn_list....................................................................................... 58CsTVIBInfo::create_iib_list .......................................................................................... 59CsTVIBInfo::find_icon................................................................................................... 59CsTVIBInfo::find_next_connection............................................................................... 59CsTVIBInfo::get_connlist.............................................................................................. 60CsTVIBInfo::get_iib_list_count .................................................................................... 60CsTVIBInfo::get_iiblist ................................................................................................. 60CsTVIBInfo::get_iiblist_icon_type................................................................................ 60CsTVIBInfo::get_iiblist_icon_type................................................................................ 60CsTVIBInfo::get_iiblist_model ..................................................................................... 61CsTVIBInfo::is_user_connection .................................................................................. 61CsTVIBInfo::move_icon ................................................................................................ 61

Contents Map APIviii Reference

CsTVIBInfo::remove_connection................................................................................... 61CsTVIBInfo::remove_icon.............................................................................................. 62

CsZoomList........................................................................................................................... 63CsZoomList::CsZoomList .............................................................................................. 63CsZoomList::CsZoomList .............................................................................................. 63CsZoomList::CsZoomList .............................................................................................. 63CsZoomList::~CsZoomList ............................................................................................ 64CsZoomList::AddItem.................................................................................................... 64CsZoomList::ClearList................................................................................................... 64CsZoomList::GetCount .................................................................................................. 64CsZoomList::GetItem .................................................................................................... 64CsZoomList::GetItem .................................................................................................... 64CsZoomList::Pack .......................................................................................................... 65CsZoomList::PackBuffer................................................................................................ 65CsZoomList::PackLength .............................................................................................. 65CsZoomList::RemoveItem ............................................................................................. 65

CsZoomedItem...................................................................................................................... 67CsZoomedItem::CsZoomedItem .................................................................................... 67CsZoomedItem::~CsZoomedItem.................................................................................. 67CsZoomedItem::GetHandle ........................................................................................... 67CsZoomedItem::GetItemType ....................................................................................... 67CsZoomedItem::GetZoomValue..................................................................................... 68CsZoomedItem::SetHandle ........................................................................................... 68CsZoomedItem::SetItemType........................................................................................ 68CsZoomedItem::SetZoomValue ..................................................................................... 68

9032524 E2ix

Preface

SPECTRUM Level II Developer’s Tools allow customers and Value Added Reseller (VAR) developers to extend the functionality of SPECTRUM.

The Map API lets a Level-2 developer modify the attributes controlling the display of map-type views (Topology, Location, Organization, etc.). Potential uses for external applications that modify the view display data include:

• Changing positions of icon or annotations• Adding or removing annotations• Changing the view’s background color or raster• Changing the icon or annotation groupings or zoom levels• Changing the view’s size or zoom level• Reading the models & connections in the view (although models and

connections can also be read via the relations)

You can also define your own map-type view, containing your own types of data, customized to display specific data types in specific patterns or locations.

This document, the

SPECTRUM Map API Reference

, provides information about the classes that make up the Map API.

Prerequisites for Readers of this Reference

This guide is intended for C++ developers who are writing applications that work with Spectrum. Prior to attempting to use the Map View API, developers must have a background in object-oriented programming and should also have an understanding of the important concepts of the object-oriented paradigm, such as data encapsulation, inheritance, and polymorphism. SPECTRUM is written in the C++ programming language and makes extensive use of these object-oriented properties. Consequently, developers wanting to extend SPECTRUM with the Map View API should be quite proficient at writing C++ code. Experience with UNIX® or Windows NT is required.

Readers also should have significant exposure to SPECTRUM. They should read the

SPECTRUM Concepts Guide

to familiarize themselves with the underlying foundation of SPECTRUM extensions before attempting to incorporate features of the Map View API. Cablegram strongly recommends that developers become familiar with applications based on the SpectroSERVER API before attempting to use the Map View API. Refer to the

SPECTRUM SpectroSERVER API Developer’s Guide

for information about this aspect of development.

Preface Map APIx Reference

How to Use This Guide

This guide describes the classes and functions provided by the Map View API. It should be used with the

SPECTRUM Global Classes Reference

and the

SPECTRUM SpectroSERVER API Reference

.

Typographical Conventions

Certain typographical conventions are used throughout SPECTRUM Developer’s Tools documentation to distinguish between classes, instances of a class (objects), and executables.

Names of Cabletron-developed classes begin with “

Cs

” and appear in

bold

— for example:

CsIHBase

and

CsIHFMax

. In this reference, the class name doubles as a title for the section describing that class, appearing in oversized bold lettering at the beginning of each such section; in addition,

Objects are an instance of a class. They have the same name as the associated class, but without the “

Cs

” prefix. They appear in

italics

. For example, an instance of class

CsClass

appears as

Class

and an instance of class

CsClient

appears as

Client.

Executable names appear in

bold italics Courier

. For example, an executable named “Application” appears as

Application

.

Other Conventions

This reference document contains descriptions of all the Map View classes, arranged in alphabetical order, with the name of the class provided as a running header above the line at the top of the page, while the first function discussed on each page is provided as a running head beneath that same line.

Questions about SPECTRUM Documentation

Send your questions, comments or suggestions regarding SPECTRUM documentation directly to the Technical Communications Department via the following internet address:

[email protected]

9032524 E2 11

CsAnnBoxmac

CsAnnBox::CsAnnBox

CLASS

CsAnnBoxmac

BASE CLASS

CsAnnotation

DESCRIPTION

Describes a box annotation, with access methods to the various data and

pack/unpack

methods. This annotation can be displayed in a

SpectroGRAPH

map view. It is usually packed and unpacked by a containing

CsAnotationList

.

METHODS

FUNCTION

CsAnnBox::CsAnnBox

SYNOPSIS

CsAnnBox( void )

DESCRIPTION

Default constructor for

CsAnnBox

.

FUNCTION

CsAnnBox::CsAnnBox

SYNOPSIS

CsAnnBox( int upper_left_x, int upper_left_y, int lower_right_x, int lower_right_y, int fg_color, int bg_color, CsTulong line_thickness, CsAnnDefs::LineStyle_e line_style, CsAnnDefs::FillStyle_e fill_style )

ARGUMENTS

upper_left_x upper_left_y

Upper left coordinates of the box.

lower_right_x lower_right_y

Lower right coordinates of the box.

fg_color bg_color

Color of the box.

line_thickness

Thickness of the box's line.

line_style

Box's line style: solid, dashed, or DblDashed.

fill_style Box's fill style: off, on, raised, re-cessed.

DESCRIPTION Constructor for CsAnnBox.

FUNCTION CsAnnBox::CsAnnBox SYNOPSIS CsAnnBox( const CsTuchar * packed_msg, const CsTuchar **

next_byte )

ARGUMENTS packed_msg Byte stream to unpack.next_byte Returns a pointer to first byte after the box's

data. Can be 0.

DESCRIPTION Unpack constructor for CsAnnBox.

CsAnnBoxmacCsAnnBox::operator=

12 Map APIReference

FUNCTION CsAnnBox::operator= SYNOPSIS const CsAnnBox & operator=( const CsAnnBox & rhs )

ARGUMENTS rhs Object to assign from.

DESCRIPTION Assignment operator for CsAnnBox.

FUNCTION CsAnnBox::GetBgColor CsAnnBox::SetBgColor

SYNOPSIS int GetBgCmacolor( void ) constvoid SetBgColor( int bg_color )

DESCRIPTION Gets and sets the box's background color. The background color is used if the fill style is Off and the line style is DblDashed. The default value is 244 (black).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnBox::GetFgColor CsAnnBox::SetFgColor

SYNOPSIS int GetFgColor( void )const void SetFgColor( int fg_color )

DESCRIPTION Gets and sets the box's foreground color. The foreground color is used as the box's fill color if the fill style is On, Raised, or Recessed. If the fill style is Off, the foreground color is used to draw the box's line. The default value is 252 (white).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnBox::GetLineStyle CsAnnBox::SetLineStyle

SYNOPSIS CsAnnDefs::LineStyle_e GetLineStyle( void )constvoid SetLineStyle( CsAnnDefs::LineStyle_e line_style )

DESCRIPTION Gets and sets the box's line style. This only has an effect if the box's fill style is Off. Solid makes a solid line of foreground color. Dashed makes a dashes line alternating between foreground color and the view's background. DblDashed makes a dashed line alternating between foreground color and background color. The default value is Solid.

9032524 E2 13

CsAnnBoxmac

CsAnnBox::SetLineThickness

FUNCTION CsAnnBox::GetLineThickness CsAnnBox::SetLineThickness

SYNOPSIS CsTulong GetLineThickness( void ) const void SetLineThickness( CsTulong line_thickness )

DESCRIPTION Gets and sets the thickness of the box's line, in pixels. If the fill style is Off, line thickness controls the box's outline. If the fill style is Raised or Recessed, the line thickness controls the amount of shadow displayed. If the fill style is On, line thickness will increase the size of the box by half that amount. The default value is 1 pixel.

The line thickness values range from 1 to 10.

FUNCTION CsAnnBox::GetLowerRightX CsAnnBox::GetLowerRightY CsAnnBox::SetLowerRightX CsAnnBox::SetLowerRightY

SYNOPSIS int GetLowerRightX( void ) constint GetLowerRightY( void ) const void SetLowerRightX( int upper_left_x )void SetLowerRightY( int upper_left_y )

DESCRIPTION Gets and sets the pixel coordinates for the box's lower-right corner in the view. The default values are: LowerRightX: 0, LowerRightY: 0.

FUNCTION CsAnnBox::GetUpperLeftX CsAnnBox::GetUpperLeftY CsAnnBox::SetUpperLeftX CsAnnBox::SetUpperLeftY

SYNOPSIS int GetUpperLeftX( void ) constint GetUpperLeftY( void ) const void SetUpperLeftX( int upper_left_x )void SetUpperLeftY( int upper_left_y )

DESCRIPTION Gets and sets the pixel coordinates for the box's upper-left corner in the view. The default values are: UpperLeftX: 0 and UpperLeftY: 0.

FUNCTION CsAnnBox::MakeDuplicate SYNOPSIS virtual CsAnnotation * MakeDuplicate( void ) const

DESCRIPTION Redefined from class CsAnnotation.

CsAnnBoxmacCsAnnBox::Pack

14 Map APIReference

FUNCTION CsAnnBox::Pack SYNOPSIS virtual CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnBox::PackedLength SYNOPSIS virtual CsTulong PackedLength( void ) const

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnBox::Print SYNOPSIS virtual void Print( ostream & os ) const

ARGUMENTS os Stream to print the description to.

DESCRIPTION Redefined from class CsAnnotation to output a description of CsAnnBox. An example of the output format is as follows (on one line):

Box:UpperLeftX:6,UpperLeftY:6,LowerRightX:46,LowerRightY:46,FgColor:128,BgColor:88,LineThickness:5,LineStyle:1,FillStyle:0

9032524 E2 15

CsAnnCircle

CsAnnCircle::CsAnnCircle

CLASS CsAnnCircleBASE CLASS CsAnnotation

DESCRIPTION Describes a box annotation, with access methods to the various data and pack/unpack methods. This annotation can be displayed in a SpectroGRAPH map view. It is usually packed and unpacked by a containing CsAnotationList.

METHODS

FUNCTION CsAnnCircle::CsAnnCircle SYNOPSIS CsAnnCircle( void )

DESCRIPTION Default constructor for CsAnnCircle.

FUNCTION CsAnnCircle::CsAnnCircle SYNOPSIS CsAnnCircle( int upper_left_x, int upper_left_y, int

lower_right_x, int lower_right_y, int fg_color, int bg_color, CsTulong line_thickness, CsAnnDefs::LineStyle_e line_style, CsAnnDefs::FillStyle_e fill_style )

ARGUMENTS upper_left_x upper_left_y Upper left coordinates of the circle.lower_right_x lower_right_y Lower right coordinates of the circle.fg_color bg_color Color of the circle.line_thickness Thickness of the circle's line.line_style Circle's line style: Solid, Dashed, or

DblDashed.fill_style Circle's fill style: Off, On, Raised, Re-

cessed.

DESCRIPTION Constructor for CsAnnCircle.

FUNCTION CsAnnCircle::CsAnnCircle SYNOPSIS CsAnnCircle( const CsTuchar * packed_msg, const CsTuchar **

next_byte )

ARGUMENTS packed_msg Byte stream to unpack.next_byte Returns a pointer to first byte after the

circle's data. Can be 0.

DESCRIPTION Unpack constructor for CsAnnCircle.

CsAnnCircleCsAnnCircle::operator=

16 Map APIReference

FUNCTION CsAnnCircle::operator= SYNOPSIS const CsAnnCircle & operator=( const CsAnnCircle & rhs )

ARGUMENTS rhs Object to assign from.

DESCRIPTION Assignment operator for CsAnnCircle.

FUNCTION CsAnnCircle::GetBgColor CsAnnCircle::SetBgColor

SYNOPSIS int GetBgColor( void )constvoid SetBgColor( int bg_color )

DESCRIPTION Gets and sets the circle's background color. The background color is used if the fill style is Off and the line style is DblDashed.

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnCircle::GetFgColor CsAnnCircle::SetFgColor

SYNOPSIS int GetFgColor( void ) const void SetFgColor( int fg_color )

DESCRIPTION Gets and sets the circle's foreground color. The foreground color is used as the circle's fill color if the fill style is On, Raised, or Recessed. If the fill style is Off, the foreground color is used to draw the circle's line.

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnCircle::GetLineStyle CsAnnCircle::SetLineStyle

SYNOPSIS CsAnnDefs::LineStyle_e GetLineStyle( void ) constvoid SetLineStyle( CsAnnDefs::LineStyle_e line_style )

DESCRIPTION Gets and sets the circle's line style. This only has an effect if the Circle's fill style is Off. Solid makes a solid line of foreground color. Dashed makes a dashes line alternating between foreground color and the view's background. DblDashed makes a dashed line alternating between foreground color and background color.

9032524 E2 17

CsAnnCircle

CsAnnCircle::SetLineThickness

FUNCTION CsAnnCircle::GetLineThicknessCsAnnCircle::SetLineThickness

SYNOPSIS CsTulong GetLineThickness( void )const void SetLineThickness( CsTulong line_thickness )

DESCRIPTION Gets and sets the thickness of the circle's line, in pixels. If the fill style is Off, line thickness controls the circle's outline. Otherwise, the line thickness has no effect.

The line thickness values range from 1 to 10.

FUNCTION CsAnnCircle::GetLowerRightX CsAnnCircle::GetLowerRightY CsAnnCircle::SetLowerRightX CsAnnCircle::SetLowerRightY

SYNOPSIS int GetLowerRightX( void ) constint GetLowerRightY( void ) const void SetLowerRightX( int upper_left_x ) void SetLowerRightY( int upper_left_y )

DESCRIPTION Gets and sets the pixel coordinates for the circle's bounding rectangle's lower-right corner in the view. The default values are: LowerRightX: 0 and LowerRightY: 0.

FUNCTION CsAnnCircle::GetUpperLeftX CsAnnCircle::GetUpperLeftY CsAnnCircle::SetUpperLeftX CsAnnCircle::SetUpperLeftY

SYNOPSIS int GetUpperLeftX( void ) constint GetUpperLeftY( void ) const void SetUpperLeftX( int upper_left_x ) void SetUpperLeftY( int upper_left_y )

DESCRIPTION Gets and sets the pixel coordinates for the circle's bounding rectangle's upper-left corner in the view. The default values are: UpperLeftX: 0 and UpperLeftY: 0.

FUNCTION CsAnnCircle::MakeDuplicate SYNOPSIS virtual CsAnnotation * MakeDuplicate( void ) const

DESCRIPTION Redefined from class CsAnnotation.

CsAnnCircleCsAnnCircle::Pack

18 Map APIReference

FUNCTION CsAnnCircle::Pack SYNOPSIS virtual CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnCircle::PackedLength SYNOPSIS virtual CsTulong PackedLength( void ) const

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnCircle::Print SYNOPSIS virtual void Print( ostream & os ) const

ARGUMENTS os Stream to print the description to.

DESCRIPTION Redefined from class CsAnnotation to output a description of CsAnnCircle. An example of the output format is as follows (on one line):

Circle:UpperLeftX:6,UpperLeftY:6,LowerRightX:46,LowerRightY:46,FgColor:128,BgColor:88,LineThickness:5,LineStyle:1,FillStyle:0

9032524 E2 19

CsAnnLine

CsAnnLine::CsAnnLine

CLASS CsAnnLineBASE CLASS CsAnnotation

DESCRIPTION Describes a line annotation, with access methods to the various data and pack/unpack methods. This annotation can be displayed in a SpectroGRAPH map view. It is usually packed and unpacked by a containing CsAnotationList.

METHODS

FUNCTION CsAnnLine::CsAnnLine SYNOPSIS CsAnnLine( void )

DESCRIPTION Default constructor for CsAnnLine.

FUNCTION CsAnnLine::CsAnnLine SYNOPSIS CsAnnLine( int start_x, int start_y, int end_x, int end_y, int

fg_color, int bg_color, CsTulong line_thickness, CsAnnDefs::LineStyle_e line_style )

ARGUMENTS start_x Line's starting x position.start_y Line's starting y position.end_x Line's ending x position.end_y Line's ending y position.fg_color Line's foreground color.bg_color Line's background color.line_thickness Line's thickness.line_style Line's style.

DESCRIPTION Constructor for CsAnnLine.

FUNCTION CsAnnLine::CsAnnLine SYNOPSIS CsAnnLine( const CsAnnLine & ann_line )

ARGUMENTS ann_line Object to copy.

DESCRIPTION Copy constructor for CsAnnLine.

CsAnnLineCsAnnLine::CsAnnLine

20 Map APIReference

FUNCTION CsAnnLine::CsAnnLine SYNOPSIS CsAnnLine( const CsTuchar * packed_msg, const CsTuchar **

next_byte )

ARGUMENTS packed_msg Byte stream to unpack.next_byte Returns a pointer to first byte after the line's data. Can

be 0.

DESCRIPTION Unpack constructor for CsAnnLine.

FUNCTION CsAnnLine::operator= SYNOPSIS const CsAnnLine & operator=( const CsAnnLine & rhs )

ARGUMENTS rhs Object to assign from.

DESCRIPTION Assignment operator for CsAnnLine.

FUNCTION CsAnnLine::GetBgColor CsAnnLine::SetBgColor

SYNOPSIS int GetBgColor( void ) constvoid SetBgColor( int bg_color )

DESCRIPTION Gets and sets the line's background color. The background color is used if the line style is DblDashed. The default value is 244 (black).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnLine::GetEndX CsAnnLine::GetEndY CsAnnLine::SetEndX CsAnnLine::SetEndY

SYNOPSIS int GetEndX( )const int GetEndY( ) constvoid SetEndX( int end_x )void SetEndY( int end_y )

DESCRIPTION Gets and sets the pixel coordinates for the line's ending point. The default values are: EndX: 0 and EndY: 0.

9032524 E2 21

CsAnnLine

CsAnnLine::SetFgColor

FUNCTION CsAnnLine::GetFgColor CsAnnLine::SetFgColor

SYNOPSIS int GetFgColor( void )const void SetFgColor( int fg_color )

DESCRIPTION Gets and sets the line's foreground color. The foreground color is used to draw the line's line. The default value is 252 (white).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnLine::GetLineThickness CsAnnLine::SetLineThickness

SYNOPSIS CsTulong GetLineThickness( void ) const void SetLineThickness( CsTulong line_thickness )

DESCRIPTION Gets and sets the thickness of the line's line, in pixels. The default value is 1 pixel.

The line thickness values range from 1 to 10.

FUNCTION CsAnnLine::GetStartX CsAnnLine::GetStartY CsAnnLine::SetStartX CsAnnLine::SetStartY

SYNOPSIS int GetStartX( ) constint GetStartY( )const void SetStartX( int start_x )void SetStartY( int start_y )

DESCRIPTION Gets and sets the pixel coordinates for the line's starting point. The default values are: StartX: 0, StartY: 0.

FUNCTION CsAnnLine::MakeDuplicate SYNOPSIS virtual CsAnnotation * MakeDuplicate( void ) const

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnLine::Pack SYNOPSIS virtual CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Redefined from class CsAnnotation.

CsAnnLineCsAnnLine::PackedLength

22 Map APIReference

FUNCTION CsAnnLine::PackedLength SYNOPSIS virtual CsTulong PackedLength( void ) const

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnLine::Print SYNOPSIS virtual void Print( ostream & os ) const

ARGUMENTS os Stream to print the description to.

DESCRIPTION Redefined from class CsAnnotation to output a description of CsAnnLine. An example of the output format is as follows (on one line):

Line:StartX:6,StartY:6,EndX:46,EndY:46,FgColor:128,BgColor:88, LineThickness:5,LineStyle:1

FUNCTION CsAnnLine::GetLineStyleCsAnnLine::SetLineStyle

SYNOPSIS CsAnnDefs::LineStyle_e GetLineStyle( void ) constvoid SetLineStyle( CsAnnDefs::LineStyle_e line_style )

DESCRIPTION Gets and sets the line’s line style. Solid makes a solid line of foreground color. Dashed makes a dashes line alternating between foreground color and the view’s background. DblDashed makes a dashed line alternating between foreground color and background color. The default value is Solid.

9032524 E2 23

CsAnnotation

CsAnnotation::CsAnnotation

CLASS CsAnnotationBASE CLASS None.

DESCRIPTION Describes an abstract annotation's pack, unpack, print, and duplicate operations.

METHODS

FUNCTION CsAnnotation::CsAnnotation SYNOPSIS CsAnnotation( void )

DESCRIPTION Default constructor for CsAnnotation.

FUNCTION CsAnnotation::~CsAnnotation SYNOPSIS ~CsAnnotation( void )

DESCRIPTION Destructor for CsAnnotation.

FUNCTION CsAnnotation::MakeDuplicate SYNOPSIS virtual CsAnnotation * MakeDuplicate( void ) const = 0

DESCRIPTION Creates and returns a copy of this annotation. The caller is responsible for freeing the returned memory. This can be used by objects collecting CsAnnotations that it wished to duplicate. This method must be overridden by derived classes.

This method is used by CsAnnotationList and will generally not have to be called.

FUNCTION CsAnnotation::Pack SYNOPSIS virtual CsTuchar * Pack( CsTuchar * packed_msg ) const = 0

ARGUMENTS packed_msg Byte stream to pack the annotation into.

DESCRIPTION Packs the annotation into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object. This method must be overridden by derived classes.

This method is used by CsAnnotationList and will generally not have to be called.

CsAnnotationCsAnnotation::PackedLength

24 Map APIReference

FUNCTION CsAnnotation::PackedLength SYNOPSIS virtual CsTulong PackedLength( void ) const = 0

DESCRIPTION Returns the number of bytes needed to pack this annotation. This method must be overridden by derived classes.

This method is used by CsAnnotationList and will generally not have to be called.

FUNCTION CsAnnotation::Print SYNOPSIS virtual void Print( ostream & os ) const = 0

ARGUMENTS os Stream to print the description to.

DESCRIPTION Output a text description of the annotation. This method must be overridden by derived classes. The format should be in the format: Annotation-type:data-name:value[,data-name:value]...

This method is used by operator<< and will generally not have to be called.

9032524 E2 25

CsAnnotationList

CsAnnotationList::CsAnnotationList

CLASS CsAnnotationListBASE CLASS None.

DESCRIPTION Contains a list of annotation descriptions, with methods to pack and unpack the list.

A packed CsBuffer of this object is stored in the VIB_Display_List (0x10039) attribute to store annotations for a map view. This class is also packed into the CsPackedVib object.

METHODS

FUNCTION CsAnnotationList::CsAnnotationList SYNOPSIS CsAnnotationList( void )

DESCRIPTION Default constructor for CsAnnotationList.

FUNCTION CsAnnotationList::CsAnnotationList SYNOPSIS CsAnnotationList( const CsTuchar * packed_msg, const CsTuchar

** next_byte )

ARGUMENTS packed_msg Byte stream to unpack.next_byte Returns a pointer to first byte after the box's data. Can

be 0.

DESCRIPTION Unpack constructor for CsAnnotationList. If the data was read from the VIB_Display_List attribute, it should be unpacked something line this:

CsBuffer * ann_list_buf = (CsBuffer *)vals->get_val( /*index=*/0 );

if ( ann_list_buf->get_length() > 0 ){

const CsTuchar *ann_list_data = ann_list_buf->get_data();

annotationList = new CsAnnotationList( ann_list_data, (const CsTuchar**)&ann_list_data);

}else{

annotationList = new CsAnnotationList( );}

CsAnnotationListCsAnnotationList::CsAnnotationList

26 Map APIReference

FUNCTION CsAnnotationList::CsAnnotationList SYNOPSIS CsAnnotationList( const CsAnnotationList & ann_list )

ARGUMENTS ann_list Annotation list to copy.

DESCRIPTION Copy constructor for CsAnnotationList.

FUNCTION CsAnnotationList::~CsAnnotationList SYNOPSIS ~CsAnnotationList( void )

DESCRIPTION Destructor for CsAnnotationList.

FUNCTION CsAnnotationList::operator= SYNOPSIS const CsAnnotationList & operator=( const CsAnnotationList &

ann_list )

ARGUMENTS ann_list Annotation list to copy.

DESCRIPTION Assignment operator for CsAnnotationList.

FUNCTION CsAnnotationList::operator[] SYNOPSIS CsAnnotation & operator[]( size_t index ) const

ARGUMENTS index The index of the annotation.

DESCRIPTION Returns the annotation at position 'index' in the list. Index must be in the range 0..Entries()-1. The returned annotation's memory will persist until that annotation is removed from the list or until the list is destroyed.

FUNCTION CsAnnotationList::Clear SYNOPSIS void Clear( void )

DESCRIPTION Removes all annotations from the list.

FUNCTION CsAnnotationList::Entries SYNOPSIS size_t Entries( void ) const

DESCRIPTION Returns the number of annotations in the list.

FUNCTION CsAnnotationList::Get SYNOPSIS CsAnnotation & Get( size_t index ) const

9032524 E2 27

CsAnnotationList

CsAnnotationList::Insert

ARGUMENTS index Index of the annotation.

DESCRIPTION Returns the annotation at position 'index' in the list. Index must be in the range 0..Entries()-1. The returned annotation's memory will persist until that annotation is removed from the list or until the list is destroyed.

FUNCTION CsAnnotationList::Insert SYNOPSIS void Insert( const CsAnnotation & annotation )

ARGUMENTS annotation Annotation to add to the end of the list.

DESCRIPTION Stores a copy of the passed annotation at the end of the list. Annotations at the end of the list are displayed underneath all other overlapping annotations.

FUNCTION CsAnnotationList::Pack SYNOPSIS CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Packs the annotation list into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the VIB_Display_List should be done using PackBuffer().

FUNCTION CsAnnotationList::PackBuffer SYNOPSIS CsBuffer * PackBuffer( void ) const

DESCRIPTION Packs the annotations list and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory. This method is useful for writing the VIB_Display_List attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 );vals->set_val( 0, /*VIB_Display_List*/0x00010039, ann_list-

PackBuffer(), CsAttrDesc::OCTET_STRING );CsUIModelHandle * ui_mh = new CsUIModelHandle( mh );write_id = ui_mh->write_async( vals, (CsMailClient*)this );

FUNCTION CsAnnotationList::PackedLength SYNOPSIS CsTulong PackedLength( void ) const

DESCRIPTION Returns the number of bytes needed to pack this annotation list.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the VIB_Display_List should be done using PackBuffer().

CsAnnotationListCsAnnotationList::Remove

28 Map APIReference

FUNCTION CsAnnotationList::Remove SYNOPSIS CsTboolean Remove( const CsAnnotation & annotation )

ARGUMENTS annotation Annotation to remove from the list.

DESCRIPTION Removes and deletes the specified annotation from the list. TRUE is returned if the specified annotation is found, FALSE otherwise.

9032524 E2 29

CsAnnText

CsAnnText::CsAnnText

CLASS CsAnnTextBASE CLASS CaAnnotation

DESCRIPTION Describes a text annotation, with access methods to the various data and pack/unpack methods. This annotation can be displayed in a SpectroGRAPH map view. It is usually packed and unpacked by a containing CsAnotationList.

METHODS

FUNCTION CsAnnText::CsAnnText SYNOPSIS CsAnnText( void )

DESCRIPTION Default constructor for CsAnnText.

FUNCTION CsAnnText::CsAnnText SYNOPSIS CsAnnText( const CsAnnText & ann_text )

ARGUMENTS ann_text Text annotation to copy.

DESCRIPTION Copy constructor for CsAnnText.

FUNCTION CsAnnText::CsAnnText SYNOPSIS CsAnnText( int pos_x, int pos_y, int fg_color, int bg_color,

CsTboolean draw_background, const char * font_name, const char * text_string, int text_width = 0, int text_height = 0, int font_ascent = 0 )

ARGUMENTS pos_x pos_y Position of the text annotation.fg_color bg_color Color of the text annotation.draw_background If TRUE, draw both the foreground and back-

ground colors.font_name Name of X11 system or spectrum alias font.text_string The text annotation's string.text_width text_height Dimensions of the text annotation.font_ascent The number of pixels from posY to the top of the

font.

DESCRIPTION Constructor for CsAnnText.

CsAnnTextCsAnnText::CsAnnText

30 Map APIReference

FUNCTION CsAnnText::CsAnnText SYNOPSIS CsAnnText( const CsTuchar * packed_msg, const CsTuchar **

next_byte )

ARGUMENTS packed_msg Byte stream to unpack.next_byte Returns a pointer to first byte after the text's data. Can

be 0.

DESCRIPTION Unpack constructor for CsAnnText.

FUNCTION CsAnnText::~CsAnnText SYNOPSIS ~CsAnnText( void )

DESCRIPTION Destructor for CsAnnText.

FUNCTION CsAnnText::operator= SYNOPSIS const CsAnnText & operator=( const CsAnnText & ann_text )

ARGUMENTS ann_text Text annotation to copy.

DESCRIPTION Assignment operator for CsAnnText.

FUNCTION CsAnnText::GetBgColor CsAnnText::SetBgColor

SYNOPSIS int GetBgColor( ) constvoid SetBgColor( int bg_color )

DESCRIPTION Gets and sets the background color of the text annotation. This color is used when DrawBackground is TRUE to draw a background behid the text. The default value is 244 (black).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnText::GetDrawBackgroundCsAnnText::SetDrawBackground

SYNOPSIS CsTboolean GetDrawBackground( ) const void SetDrawBackground( CsTboolean draw_background )

DESCRIPTION Gets and sets specifying if a background rectangle of BgColor is drawn behind the text annotation. The default value is FALSE.

9032524 E2 31

CsAnnText

CsAnnText::SetFgColor

FUNCTION CsAnnText::GetFgColor CsAnnText::SetFgColor

SYNOPSIS int GetFgColor( ) constvoid SetFgColor( int fg_color ) DESCRIPTION

Gets and sets the foreground color of the text annotation. This color is used to draw the text. The default value is 252 (white).

The color values range from 77 to 255. Use the "Select Color Index" dialog from SpectroGRAPH to see the index-to-color mappings.

FUNCTION CsAnnText::GetPosX CsAnnText::SetPosX CsAnnText::GetPosY CsAnnText::SetPosY

SYNOPSIS int GetPosX( ) constvoid SetPosX( int pos_x )int GetPosY( ) const void SetPosY( int pos_y )

DESCRIPTION Gets and sets the position of the text annotation in the view. PosX specifies the left side of the text annotation. PosY specifies the base line (bottom) of the text annotation. Subtract Ascent from PosY to get the top of the text annotation. The default values are: PosX: 0, PosY: 0.

FUNCTION CsAnnText::GetTextWidth CsAnnText::SetTextWidth CsAnnText::GetTextHeightCsAnnText::SetTextHeight

SYNOPSIS int GetTextWidth( ) constvoid SetTextWidth( int text_width )int GetTextHeight( ) constvoid SetTextHeight( int text_height )

DESCRIPTION Gets and sets the font's width and height in pixels. These values are calculated by the view before drawing and do not have to be set when creating a new anotation. Once a user has edited and saved a view, the correct dimensions will be stored.

FUNCTION CsAnnText::MakeDuplicate SYNOPSIS virtual CsAnnotation * MakeDuplicate( void ) const

DESCRIPTION Redefined from class CsAnnotation.

CsAnnTextCsAnnText::Pack

32 Map APIReference

FUNCTION CsAnnText::Pack SYNOPSIS virtual CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnText::PackedLength SYNOPSIS virtual CsTulong PackedLength( void ) const

DESCRIPTION Redefined from class CsAnnotation.

FUNCTION CsAnnText::Print SYNOPSIS virtual void Print( ostream & os ) const

ARGUMENTS os Stream to print the description to.

DESCRIPTION Redefined from class CsAnnotation to output a description of CsAnnText. An example of the output format is as follows (on one line):

Text:PosX:100,PosY:100,TextWidth:230,TextHeight:15,FgColor:128,BgColor:88,DrawBackground:0,FontName:'9x15',FontAscent:15,TextString:Hello, world

Note that the special characters in the TextString value are not escaped. However, this value is listed last to make parsing easier.

FUNCTION char * CsAnnText::GetFontNameCsAnnText::SetFontName

SYNOPSIS const char * GetFontName( ) constvoid SetFontName( const char * font_name )

DESCRIPTION Gets and sets the name of the spectrum font alias or X11 system name. Examples of spectrum alias font names, such as CsLargeFont can be found in the SG-Tools/appdef/spectrum.fonts file. An example of an X11 system font name is -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-1 or 9x15.

The specified font name must not be 0. The returned font name is guaranteed to be non-null. The default value is 9x15.

FUNCTION char * CsAnnText::GetTextStringCsAnnText::SetTextString

SYNOPSIS const char * GetTextString( ) constvoid SetTextString( const char * text_string )

9032524 E2 33

CsAnnText

CsAnnText::SetFontAscent

DESCRIPTION Gets and sets the text annotation’s string that is drawn. The view currently does not handle newlines (‘\n’) or other special formatting characters.The specified text string must not be 0. The returned text string is guaranteed to be non-null. The default value is ““.

FUNCTION CsAnnText::GetFontAscentCsAnnText::SetFontAscent

SYNOPSIS int GetFontAscent( ) constvoid SetFontAscent( int font_ascent )

DESCRIPTION Gets and sets the font’s ascent (that is, the number of pixels from posY to the top of the annotation).

Note that the font_ascent must be set to the font’s ascent for pre-5.0 UI servers; otherwise, the text annotations will jump when the view is coming up. The ascent is generally the font’s pixel size. It is not neccessary to specify this value for servers used with SPECTRUM 5.0 and beyond, as it is calculated by the view before displaying the font. Once a user has edited and saved a view, the correct ascent will be stored.

CsConnectionListCsConnectionList::operator=

34 Map APIReference

CLASS CsConnectionListBASE CLASS None

DESCRIPTION Contains a list of connection (pipe) descriptions, with methods to pack and unpack the list.

Use the CsTVIBInfo methods to construct this object as the CsConnectionList class references indeces in the CsIIBList, and the CsTVIBInfo methods update any index changes in CsIIBList in the CsConnectionList.

A packed CsBuffer of this object is stored in the TVIB_Connection_List (0x1006d) attribute by inference handlers to store connection descriptions for a map view. This class is also packed into the CsPackedVib object.

Create this object after reading it from the TVIB_Connection_List attribute as follows:

CsTVIBInfo tvib_info( CS_NULL_MODEL_HANDLE );tvib_info.create_conn_list((CsTuchar *)vals->get_val( /*index=*/0 ));

METHODS

FUNCTION CsConnectionList::operator= SYNOPSIS const CsConnectionList & operator=( const CsConnectionList &

rhs )

ARGUMENTS rhs Object to assign from.

DESCRIPTION Assignment operator for CsConnectionList.

FUNCTION CsConnectionList::get_destination_index SYNOPSIS CsTulong get_destination_index( CsTulong index ) const

ARGUMENTS index Index into the connection list.

DESCRIPTION Returns the index into the iib list of the model involved in the destination half of the specified connection. Index must be in the range 0..get_count()-1.

FUNCTION CsConnectionList::get_source_index SYNOPSIS CsTulong get_source_index( CsTulong index ) const

9032524 E2 35

CsConnectionList

CsConnectionList::has_been_modified

ARGUMENTS index Index into the connection list.

DESCRIPTION Returns the index into the iib list of the model involved in the source half of the specified connection. Index must be in the range 0..get_count()-1.

FUNCTION CsConnectionList::has_been_modified SYNOPSIS CsTboolean has_been_modified( void ) const

DESCRIPTION Returns TRUE if the list has been modified since it was constructed.

FUNCTION CsConnectionList::move_model SYNOPSIS void move_model( CsTulong src_iib_index, CsTulong

dst_iib_index )

ARGUMENTS src_iib_index Old iib list index of an icon.dst_iib_index New iib list index of an icon.

DESCRIPTION Moves all references of the icon at src_iib_index to now reference dst_iib_index. This is used to update the connection list if an icon's index changes.

FUNCTION CsConnectionList::pack SYNOPSIS CsTuchar * pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the icon list into.

DESCRIPTION Packs the connection list into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the TVIB_Connection_List should be done using PackBuffer().

FUNCTION CsConnectionList::pack_buffer SYNOPSIS CsBuffer * pack_buffer( void ) const

DESCRIPTION Packs the connection list and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory. This method is useful for writing the TVIB_Connection_List attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 ); vals->set_val( 0, /*TVIB_Connection_List*/0x1006d, conn_list->pack_buffer(), CsAttrDesc::OCTET_STRING ); CsUIModelHandle * ui_mh = new CsUIModelHandle( mh ); write_id = ui_mh->write_async( vals, (CsMailClient*)this );

CsConnectionListCsConnectionList::packed_length

36 Map APIReference

FUNCTION CsConnectionList::packed_length SYNOPSIS CsTulong packed_length( void ) const

DESCRIPTION Returns the number of bytes needed to pack this icon list.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the TVIB_Connection_List should be done using PackBuffer().

FUNCTION CsConnectionList::remove SYNOPSIS void remove( CsTulong index )

ARGUMENTS index Specifies which connection to remove.

DESCRIPTION Removes the connection at the specified index from the connection list. Index must be in the range 0..get_count()-1.

FUNCTION CsConnectionList::swap_source_and_destination SYNOPSIS void swap_source_and_destination( CsTulong index )

ARGUMENTS index Index into the connection list.

DESCRIPTION Swaps the source and destination halfs of the specified connection.

9032524 E2 37

CsGroup

CsGroup::CsGroup

CLASS CsGroupBASE CLASS None.

DESCRIPTION Holds a list of objects in a group. Each object in the group is described by a CsGroupElement.

METHODS

FUNCTION CsGroup::CsGroup SYNOPSIS CsGroup( void )

DESCRIPTION Default constructor.

FUNCTION CsGroup::~CsGroup SYNOPSIS ~CsGroup( void )

DESCRIPTION Destructor of the class.

FUNCTION CsGroup::AddElement SYNOPSIS void AddElement( CsGroupElement *elt )

DESCRIPTION Adds the element 'elt' and takes ownership of the memory.

FUNCTION CsGroup::AddElements SYNOPSIS void AddElements( CsGroup *grp )

DESCRIPTION Adds all elements in group grp.

FUNCTION CsGroup::ClearGroup SYNOPSIS void ClearGroup( void )

DESCRIPTION Removes all elements in the group and delete them.

FUNCTION CsGroup::GetCount SYNOPSIS int GetCount( void ) const

CsGroupCsGroup::GetElement

38 Map APIReference

DESCRIPTION Returns the number of elements in the group.

RETURNS int

FUNCTION CsGroup::GetElement SYNOPSIS CsGroupElement * GetElement( int index ) const

DESCRIPTION Returns the group element at a particular index.

RETURNS CsGroupElement *

9032524 E2 39

CsGroupElement

CsGroupElement::CsGroupElement

CLASS CsGroupElementBASE CLASS None.

DESCRIPTION Contains a pointer to an item, the item's handle and the type of the item. This class is used so that both models and annotations can be put into groups together. Only the handle and type are stored when the object is packed.

METHODS

FUNCTION CsGroupElement::CsGroupElement SYNOPSIS CsGroupElement( CsTulong h, CsGrpElementType t, void *p )

DESCRIPTION Constructor of the class.

FUNCTION CsGroupElement::~CsGroupElement SYNOPSIS ~CsGroupElement( void )

DESCRIPTION Destructor of the class.

FUNCTION CsGroupElement::GetHandle SYNOPSIS CsTulong GetHandle() const

DESCRIPTION Returns the 'handle' field of the element. If it is an icon, it is the model handle. If it is an annotation, the handle is the index into the display list.

RETURNS CsTulong.

FUNCTION CsGroupElement::GetType SYNOPSIS CsGroupElement::CsGrpElementType GetType( void ) const

DESCRIPTION Returns the type of the element.

RETURNS CsGroupElement::CsGrpElementType

FUNCTION CsGroupElement::SetHandle SYNOPSIS void SetHandle( CsTulong h )

DESCRIPTION Sets the handle of the element.

CsGroupElementCsGroupElement::SetType

40 Map APIReference

FUNCTION CsGroupElement::SetType SYNOPSIS void SetType( CsGroupElement::CsGrpElementType t )

DESCRIPTION Sets the type of the element.

9032524 E2 41

CsGroupList

CsGroupList::CsGroupList

CLASS CsGroupListBASE CLASS None.

DESCRIPTION Manages a list of CsGroup objects. Icons and annotations that are grouped can only be moved together as a single entity on the map, by the user or autoplace. Groups should be honored by any algorithms that move icons in a view.

A packed CsBuffer of this object is stored in the groupedList (0x11d85) attribute to store icon and annotation groupings for a map view. This class is also packed into the CsPackedVib object.

METHODS

FUNCTION CsGroupList::CsGroupList SYNOPSIS CsGroupList()

DESCRIPTION Default constructor.

FUNCTION CsGroupList::CsGroupList SYNOPSIS CsGroupList( const CsTuchar * packed_msg, const CsTuchar **

next_byte )

ARGUMENTS packed_msg Byte stream to pack the group list into.next_byte Returns a pointer to first byte after the object's data.

Can be 0.

DESCRIPTION Unpack constructor for CsConnectionList. If the data was read from the groupedList attribute, it should be unpacked something line this:

if ( vals->get_error( /*index=*/0 ) == CsError::SUCCESS ){

CsBuffer * group_buf = (CsBuffer *)vals->get_val( /*index=*/0 );if ( group_buf->get_length() > 0 ){

const CsTuchar *group_data = group_buf->get_data();delete groupList;groupList = new CsGroupList( group_data,

(constCsTuchar**)&group_data);}

}

CsGroupListCsGroupList::CsGroupList

42 Map APIReference

FUNCTION CsGroupList::CsGroupList SYNOPSIS CsGroupList( const CsGroupList & copy_obj )

DESCRIPTION Copy constructor for CsGroupList.

FUNCTION CsGroupList::~CsGroupList SYNOPSIS ~CsGroupList( void )

DESCRIPTION Destructor for CsGroupList. All items are freed.

FUNCTION CsGroupList::AddGroup SYNOPSIS void AddGroup( CsGroup *grp )

DESCRIPTION Appends the group to the end of the list and takes ownership of the group.

FUNCTION CsGroupList::ClearGroups SYNOPSIS void ClearGroups( void )

DESCRIPTION Removes all the groups in the list and deletes them.

FUNCTION CsGroupList::GetCount SYNOPSIS int GetCount( void ) const

DESCRIPTION Returns the number of groups in the groups list object.

RETURNS int

FUNCTION CsGroupList::GetGroup SYNOPSIS CsGroup * GetGroup( int index ) const

ARGUMENTS index Specifies the group's list index.

DESCRIPTION Returns the item at the specified index. Memory ownership is retained by the list. The pointer will remain valid until the item is removed from the list or the list is destroyed. Index must be in the range 0..GetCount()-1.

RETURNS CsGroup *

FUNCTION CsGroupList::GetGroup SYNOPSIS CsGroup * GetGroup( CsTulong handle

CsGroupElement::CsGrpElementType type ) const

9032524 E2 43

CsGroupList

CsGroupList::Pack

DESCRIPTION Returns the first group which has an element matching the given handle and type.

RETURNS CsGroup *

FUNCTION CsGroupList::Pack SYNOPSIS CsTuchar * pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the group list into.

DESCRIPTION Packs the group list into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the groupedList attribute should be done using PackBuffer().

RETURNS CsTuchar *

FUNCTION CsGroupList::PackBuffer SYNOPSIS CsBuffer * PackBuffer( void ) const

DESCRIPTION Packs the group list and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory. This method is useful for writing the groupedList attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 );vals->set_val( 0, /*groupedList*/0x11d85,

group_list->PackBuffer(),CsAttrDesc::OCTET_STRING );

CsUIModelHandle * ui_mh = new CsUIModelHandle( mh );write_id = ui_mh->write_async( vals, (CsMailClient*)this );

FUNCTION CsGroupList::PackLength SYNOPSIS CsTulong PackLength( void ) const

DESCRIPTION Returns the number of bytes needed to pack this group list.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the groupedList attribute should be done using PackBuffer().

RETURNS CsTulong

FUNCTION CsGroupList::RemoveGroup SYNOPSIS void RemoveGroup( CsGroup * grp )

DESCRIPTION Removes the group that matchs grp and deletes it.

CsIIBListCsIIBList::operator=

44 Map APIReference

CLASS CsIIBListBASE CLASS None.

DESCRIPTION Contains a list of icon descriptions, with methods to pack and unpack the list.

Use the CsTVIBInfo methods to construct this object as the CsConnectionList class references indeces in the CsIIBList, and the CsTVIBInfo methods update any index changes in CsIIBList in the CsConnectionList.

A packed CsBuffer of this object is stored in the VIB_IIB_List (0x10037) attribute by inference handlers to store icon descriptions for a map view. This class is also packed into the CsPackedVib object.

Create this object after reading it from the VIB_IIB_List attribute as follows:

CsTVIBInfo tvib_info( CS_NULL_MODEL_HANDLE );tvib_info.create_iib_list(

(CsTuchar *)vals->get_val( /*index=*/0 ) );

METHODS

FUNCTION CsIIBList::operator= SYNOPSIS const CsIIBList & operator=( const CsIIBList & rhs )

ARGUMENTS rhs Object to assign from.

DESCRIPTION Assignment operator for CsIIBList.

FUNCTION CsIIBList::add SYNOPSIS CsTulong add( CsModelHandle mh, CsMTypeHandle mth,

IconClass_e icon_class CsICIcon, long x = 0, long y = 0 )

ARGUMENTS mh Model's handle. mth Model type's handle. icon_class Type of icon (e.g., CsICOPR). x The x-position of the icon relative to the window. y The y-position of the icon relative to the window.

DESCRIPTION Creates an icon with the specified values and appends it to the end of the list. Icons at the end of the list are displayed on top of all other overlapping icons. The icon's index into the list is returned.

9032524 E2 45

CsIIBList

CsIIBList::find

FUNCTION CsIIBList::find SYNOPSIS long find( CsModelHandle mh ) const

ARGUMENTS mh Model handle to match.

DESCRIPTION This method searchs the list array for the specified mh. If the mh is not found in the list, -1 is returned.

FUNCTION CsIIBList::get_count SYNOPSIS CsTulong get_count( ) const

DESCRIPTION Returns the number of icons in the list.

FUNCTION CsIIBList::get_entry SYNOPSIS CsIIBListEntry *get_entry( CsTulong index ) const

ARGUMENTS index Specifies the icon's list index.

DESCRIPTION Returns the item at the specified index. Memory ownership is retained by the list. The pointer will remain valid until the item is removed from the list or the list is destroyed. Index must be in the range 0..count-1.

FUNCTION CsIIBList::get_model SYNOPSIS CsModelHandle get_model( CsTulong index ) const

ARGUMENTS index Specifies the icon's list index.

DESCRIPTION Return the model handle of the icon at the specified list index. Index must be in the range 0..get_count()-1.

FUNCTION CsIIBList::get_type SYNOPSIS IconClass_e get_type( CsTulong index ) const

ARGUMENTS index Specifies the icon's list index.

DESCRIPTION Return the type of the icon at the specified list index. Index must be in the range 0..get_count()-1.

FUNCTION CsIIBList::get_type SYNOPSIS IconClass_e get_type( CsModelHandle mh ) const

ARGUMENTS mh Model handle of the target icon.

DESCRIPTION Return the type of the icon with the specified model handle. If not icon can be found with that mh, CsICUNKNOWN is returned.

CsIIBListCsIIBList::has_been_modified

46 Map APIReference

FUNCTION CsIIBList::has_been_modified SYNOPSIS CsTboolean has_been_modified( void ) const

DESCRIPTION Returns TRUE if the list has been modified since it was constructed. Any changes to list items that were accessed through the get_entry() method will not make the list modified.

FUNCTION CsIIBList::pack SYNOPSIS CsTuchar * pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the icon list into.

DESCRIPTION Packs the icon list into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the VIB_IIB_List should be done using PackBuffer().

FUNCTION CsIIBList::pack_buffer SYNOPSIS CsBuffer * pack_buffer( void ) const

DESCRIPTION Packs the icon list and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory. This method is useful for writing the VIB_IIB_List attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 );vals->set_val( 0, /*VIB_IIB_List*/0x10037,

iib_list->pack_buffer(),CsAttrDesc::OCTET_STRING );

CsUIModelHandle * ui_mh = new CsUIModelHandle( mh );write_id = ui_mh->write_async( vals, (CsMailClient*)this );

FUNCTION CsIIBList::packed_length SYNOPSIS CsTulong packed_length( void ) const

DESCRIPTION Returns the number of bytes needed to pack this icon list.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the VIB_IIB_List should be done using PackBuffer().

FUNCTION CsIIBList::set_position SYNOPSIS void set_position( CsTulong index, long x, long y )

9032524 E2 47

CsIIBList

CsIIBList::set_type

ARGUMENTS index Specifies the icon's list index.x y New center cordinates of the icon.

DESCRIPTION Sets the center position of the specified icon to the specified position. Index must be in the range 0..get_count()-1.

FUNCTION CsIIBList::set_type SYNOPSIS void set_type( CsTulong index, IconClass_e type )

ARGUMENTS index Specifies the icon's list index.type Icon type to set the icon to.

DESCRIPTION Sets the type of the icon at the specified list index. Index must be in the range 0..get_count()-1.

CsIIBListEntryCsIIBListEntry::CsIIBListEntry

48 Map APIReference

CLASS CsIIBListEntryBASE CLASS None

DESCRIPTION CsIIBListEntry contains the information necessary to access information regarding an icon in SpectroGRAPH's map view. This class is used as an element in the CsIIBList.

Note that the icon's size cannot be accessed. This is determined at run time by the perspective and iib files that the model type maps to. When placing icons, you can estimate the icon's diameter at 200 pixels.

METHODS

FUNCTION CsIIBListEntry::CsIIBListEntry SYNOPSIS CsIIBListEntry( CsModelHandle mh, CsMTypeHandle mth,

IconClass_e icon_type CsICICON, long x_pos = 0, long y_pos = 0 )

ARGUMENTS mh Model's handle. mth Model type's handle. icon_type Type of icon (e.g., CsICOPR). x_pos The x-position of the icon relative to the window. y_pos The y-position of the icon relative to the window.

DESCRIPTION Constructor for CsIIBListEntry.

FUNCTION CsIIBListEntry::CsIIBListEntry SYNOPSIS CsIIBListEntry( const CsTuchar * packed_msg, const CsTuchar

** next_byte )

ARGUMENTS packed_msg Byte stream to unpack next_byte Returns a pointer to first byte after the object's data.

Can be 0.

DESCRIPTION Unpack constructor for CsIIBListEntry.

FUNCTION CsIIBListEntry::get_mh CsIIBListEntry::get_mth

SYNOPSIS CsModelHandle get_mh( ) const CsMTypeHandle get_mth( ) const

DESCRIPTION Gets the model handle and model type handle associated with the icon.

9032524 E2 49

CsIIBListEntry

CsIIBListEntry::set_type

FUNCTION CsIIBListEntry::get_type CsIIBListEntry::set_type

SYNOPSIS IconClass_e get_type( ) constvoid set_type( IconClass_e type )

DESCRIPTION Gets and sets the type of the icon. See the documentation on enum IconClass_e for more information.

FUNCTION CsIIBListEntry::get_xpos CsIIBListEntry::get_ypos CsIIBListEntry::set_xpos CsIIBListEntry::set_ypos

SYNOPSIS long get_xpos( ) constlong get_ypos( ) constvoid set_xpos( long xpos )void set_ypos( long ypos )

DESCRIPTION Gets and sets the icon's center position on the view.

FUNCTION CsIIBListEntry::pack SYNOPSIS CsTuchar * pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the object into.

DESCRIPTION Packs the object into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is used by CsIIBList and will generally not have to be called.

FUNCTION CsIIBListEntry::packed_length SYNOPSIS CsTulong packed_length( void ) const

DESCRIPTION Returns the number of bytes needed to pack this object.

This method is used by CsIIBList and will generally not have to be called.

CsPackedVibCsPackedVib::CsPackedVib

50 Map APIReference

CLASS CsPackedVibBASE CLASS None.

DESCRIPTION Contains a view description that can be packed and sent to SpectroGRAPH to bring up the view data as specified. The data can be sent via a vwapi new view operation or stored in an attribute and accessed when the view is brought up by the user. See the PackBuffer() description for examples.

The packed structure is coded so that future changes in the structure can be handled with backwards compatibility.

METHODS

FUNCTION CsPackedVib::CsPackedVib SYNOPSIS CsPackedVib( void )

DESCRIPTION Default constructor for CsPackedVib.

FUNCTION CsPackedVib::CsPackedVib SYNOPSIS CsPackedVib( const CsBuffer * buf )

ARGUMENTS buf Buffer from which to get constructor data.

DESCRIPTION Constructor for CsPackedVib. The passed CsBuffer is assumed to contain a packed CsPackedVib. Example usage might be as follows:

CsBuffer * buf = (CsBuffer *)vals->get_val(/*index=*/0);CsPackedVib packed_vib( buf );delete buf;

FUNCTION CsPackedVib::~CsPackedVib SYNOPSIS ~CsPackedVib( void )

DESCRIPTION Destructor for CsPackedVib.

FUNCTION CsPackedVib::AddConnection SYNOPSIS long AddConnection( const CsModelHandle & mh1, const

CsModelHandle & mh2, CsTboolean user_connection )

9032524 E2 51

CsPackedVib

CsPackedVib::FindNextConnection

ARGUMENTS mh1 Model handle of the source model.mh2 Model handle of the destination model user_connection If TRUE, the connection will be a user (unresolved) con-

nection.

DESCRIPTION Adds or updates a connection to the connection list. The index into the connection list of the new or updated connection is returned. If the connection already exists, the direction is updated and the connection type is changed to a resolved connection (if specified as resolved).

A -1 is returned if mh1 or mh2 cannot be found in the iib list.

Use this method instead accessing the connection list directly so that consistency is maintained between the iib list and connection list.

FUNCTION CsPackedVib::FindNextConnection SYNOPSIS CsModelHandle FindNextConnection( const CsModelHandle & mh,

const CsModelHandle & starting_point ) const

ARGUMENTS mh The handle of one of the models involved in the connec-tion.

start_point The handle of the other model involved in the connec-tion, at which the search should begin. If a CS_NULL_MODEL_HANDLE is received then the search starts at the beginning.

DESCRIPTION A convenience method which returns the next model which is connected to the passed mh. The search is started at starting_point, or from the beginning if starting_point is CS_NULL_MODEL_HANDLE. If no more connections exist, CS_NULL_MODEL_HANDLE is returned.

FUNCTION CsPackedVib::GetAnnotationList CsPackedVib::SetAnnotationList

SYNOPSIS CsAnnotationList & GetAnnotationList( void ) const void SetAnnotationList( const CsAnnotationList &

annotation_list )

DESCRIPTION Access the annotation list member. The annotation list member describes the list of annotations that exist in the view. Items in this list are referenced by the group list and zoom list members.

FUNCTION CsPackedVib::GetConnList CsPackedVib::SetConnList

SYNOPSIS CsConnectionList & GetConnList( void ) const void SetConnList( const CsConnectionList & conn_list )

CsPackedVibCsPackedVib::SetEditCount

52 Map APIReference

DESCRIPTION Access the connection list member. The connection list member describes the connections (pipes) between icons in the view. Use methods in CsPackedVib to modify this member if possible so as to maintain consistency with the iib list member.

FUNCTION CsPackedVib::GetEditCount CsPackedVib::SetEditCount

SYNOPSIS long GetEditCount( void ) constvoid SetEditCount( long edit_count )

DESCRIPTION Access the edit count member. This is typically used to keep track of how many changes have been made to this structure. This member is not modified or accessed internally by the class except in the Pack/Unpack methods. This member is initialized to 0 and will remain 0 unless the Set method for this member is called.

FUNCTION CsPackedVib::GetGroupList CsPackedVib::SetGroupList

SYNOPSIS CsGroupList & GetGroupList( void ) const void SetGroupList( const CsGroupList & group_list )

DESCRIPTION Accesses the group list member. The group list member describes the grouping of models and annotations in the view.

FUNCTION CsPackedVib::GetIibListCsPackedVib::SetIibList

SYNOPSIS CsIIBList & GetIibList( void ) const void SetIibList( CsIIBList & iib_list )

DESCRIPTION Access the iib list member. The iib list member describes the list of models to be displayed in the view. Model indeces in this list are referenced by the connection list member. Use methods in CsPackedVib to modify this member if possible so as to maintain consistency with the connection list member. Model handles in this list are referenced by the group list and zoom list members.

FUNCTION CsPackedVib::GetRasterName CsPackedVib::SetRasterName

SYNOPSIS const char * GetRasterName( void ) const void SetRasterName( const char * raster_name )

DESCRIPTION Access the raster name member. The raster name member controls the background of the view. The string is interpreted as follows:

9032524 E2 53

CsPackedVib

CsPackedVib::SetVdsHeight

- empty (""), or 1 blank (" "): background is set to the color specified by the spectrum.topologybkcolor X resource.

- Prefixed with a '#': remainder of the string is interpreted as an int representing the background color. Bring up the annotation toolbox's color selector to see what color corresponds to what number. Example: #220.

- Otherwise, the string is used as an image file under the directory built from two X resources: spectrum.imagepath and spectrum.Bkgrnddir.

Example: Wd_World.csi.

The default value is #216 - Location-background blue.

FUNCTION CsPackedVib::GetVdsWidth CsPackedVib::SetVdsWidth CsPackedVib::GetVdsHeight CsPackedVib::SetVdsHeight

SYNOPSIS CsTulong GetVdsWidth( void ) const void SetVdsWidth( CsTulong vds_width ) CsTulong GetVdsHeight( void ) const void SetVdsHeight( CsTulong vds_height )

DESCRIPTION Accesses the dimensions of the view in pixels. if the raster name member specifies a background color. Otherwise, the view's background size is the size of the raster image. Note also, that the view will expand to hold any icons that are outside of the view's background.

The default value is 500x500.

FUNCTION CsPackedVib::GetXOffset CsPackedVib::SetXOffset CsPackedVib::GetYOffset CsPackedVib::SetYOffset

SYNOPSIS long GetXOffset( void ) const void SetXOffset( long x_offset )long GetYOffset( void ) const void SetYOffset( long y_offset )

DESCRIPTION Accesses the initial view scroll offset. The view will come up scrolled to these coordinates. The view must be bigger than the window so that scrolling is possible. Note that this functionality is only available for UI servers post whose version is greater than 5.0.

The default value is 0,0.

CsPackedVibCsPackedVib::SetZoomList

54 Map APIReference

FUNCTION CsPackedVib::GetZoomList CsPackedVib::SetZoomList

SYNOPSIS CsZoomList & GetZoomList( void ) constvoid SetZoomList( const CsZoomList & zoom_list )

DESCRIPTION Accesses the zoom list member. The zoom list member describes the zoom levels of the individual models contained in the view.

FUNCTION CsPackedVib::GetZoomScale CsPackedVib::SetZoomScale

SYNOPSIS CsTulong GetZoomScale( void ) const void SetZoomScale( CsTulong zoom_scale )

DESCRIPTION Access the zoom scale member. The zoom scale member specifies the current zoom level of the view with 100 indicating z zoom level of 100%. If the value is 0, the view will be zoomed to the spectrum.defaultZoomLevel X resource. The default value is 0. A view will not re-zoom if this value is set until the view is brought up again.

FUNCTION CsPackedVib::IsDataValid SYNOPSIS CsTboolean IsDataValid( DataTypes_e data_type ) const

ARGUMENTS data_type One of the packed vib's contained types.

DESCRIPTION Returns TRUE if the specified data has been set via an access 'set' method or was unpacked by the constructor. This method is generally not needed by applications. Data is only packed up if it is valid.

FUNCTION CsPackedVib::IsUserConnection SYNOPSIS CsTboolean IsUserConnection( CsTulong conn_list_index ) const

ARGUMENTS conn_list_index Index into the connection list.

DESCRIPTION A convenience method which returns TRUE if the specified connection is a user (unresolved) connection or FALSE if the connection is an auto (resolved) connection. Resolved connections are typically displayed as live pipes.

FUNCTION CsPackedVib::MoveIcon SYNOPSIS void MoveIcon( const CsModelHandle & mh, CsTulong

dest_iib_index )

ARGUMENTS mh Model handle of the icon to move.dest_iib_index Specifies the icon's destination index in the iib list.

DESCRIPTION Moves the specified icon in the iib list and updates connection list references.

9032524 E2 55

CsPackedVib

CsPackedVib::Pack

Use this method instead accessing the iib list directly so that consistency is maintained between the iib list and connection list.

FUNCTION CsPackedVib::Pack SYNOPSIS CsTuchar * Pack( CsTuchar * packed_msg ) const

ARGUMENTS packed_msg Byte stream to pack the group list into.

DESCRIPTION Packs the packed vib into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications, as PackBuffer() is sufficient and easier to use.

FUNCTION CsPackedVib::PackBuffer SYNOPSIS CsBuffer * PackBuffer( void ) const

DESCRIPTION Packs the CsPackedVib and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory.

This method can be useful for writing a packed vib attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 );vals->set_val( 0, /*packed_vib_attr=*/0x?????,

packed_vib->PackBuffer(), CsAttrDesc::OCTET_STRING );CsUIModelHandle * ui_mh = new CsUIModelHandle( mh );write_id = ui_mh->write_async( vals, (CsMailClient*)this );

Or it can be used to bring up a view via vwapi as follows:

CsBuffer * view_type_buff =new( "MY_FREEFORM_VIEW", 0 )CsBuffer;CsViewInfo * view_info = new CsViewInfo( mh, view_type_buff,

/*gib_file_buff=*/0);delete view_type_buff;view_info->set_pvib( packed_vib->PackBuffer( ) );CsUIServerHandle * ui_server_handle =

new CsUIServerHandle( CsHostAddress( ui_machine_name ) );new_view_id = ui_server_handle->new_view_async( view_info,this );

FUNCTION CsPackedVib::PackedLength SYNOPSIS CsTulong PackedLength( void ) const

DESCRIPTION Returns the number of bytes needed to pack this packed vib.

This method is generally not called by applications as PackBuffer() is sufficient and easier to use.

CsPackedVibCsPackedVib::RemoveConnection

56 Map APIReference

FUNCTION CsPackedVib::RemoveConnection SYNOPSIS void RemoveConnection( const CsModelHandle & mh1, const

CsModelHandle & mh2 )

ARGUMENTS mh1 Handle of a model in the connection.mh2 Handle of the connection's other model or

CS_NULL_MODEL_HANDLE.

DESCRIPTION Removes a connection from the connection list. If mh2 is CS_NULL_MODEL_HANDLE, then all connections with mh1 in them are removed.

Use this method instead accessing the connection list directly so that consistency is maintained between the iib list and connection list.

FUNCTION CsPackedVib::RemoveIcon SYNOPSIS void RemoveIcon( const CsModelHandle & mh )

ARGUMENTS mh Model handle of the icon to remove.

DESCRIPTION Removes and deletes the specified icon from the iib list and updates connection list references.

Use this method instead accessing the iib list directly so that consistency is maintained between the iib list and connection list.

FUNCTION CsPackedVib::UnpackBuffer SYNOPSIS void UnpackBuffer( const CsBuffer * buf )

ARGUMENTS buf Buffer from which to get data.

DESCRIPTION Unpacks the passed CsBuffer and copies the data to this object. Data members are not initialized before the unpacking, to data not stored in the buffer will not be overwritten. The passed CsBuffer is assumed to contain a packed CsPackedVib. Example usage might be as follows:

CsBuffer * buf = (CsBuffer *)vals->get_val(/*index=*/0);packed_vib/UnpackBuffer( buf );delete buf;

9032524 E2 57

CsTVIBInfo

CsTVIBInfo::CsTVIBInfo

CLASS CsTVIBInfoBASE CLASS None

DESCRIPTION This class contains the information necessary to recreate a topology view in the ui. It also has the methods to maintain the view's information.

See the CsModVib.cc example for example code that uses this class.

Note that if icons or connections are added or removed or icon types are changed and this data written to VIB_IIB_List/TVIB_Connection_List, the values will be overwritten by an inference handler the next time the containing or connecting association is added or removed. In this case these classes are mainly intended to allow the user to change the x,y positions of the icons in existing views.

To build your own views use the CsPVIB class and your own attribute.

METHODS

FUNCTION CsTVIBInfo::CsTVIBInfo SYNOPSIS CsTVIBInfo( CsModelHandle mh )

ARGUMENTS mh Handle of model from which to obtain attributes.

DESCRIPTION Constructor for CsTVIBInfo. Only the mh is initialized. The other data is set to 0, and should be intialized by a derived class.

FUNCTION CsTVIBInfo::~CsTVIBInfo SYNOPSIS ~CsTVIBInfo( void )

DESCRIPTION Destructor for CsTVIBInfo.

FUNCTION CsTVIBInfo::add_connection SYNOPSIS long add_connection( CsModelHandle mh1, CsModelHandle mh2,

CsTboolean user_connection = FALSE )

ARGUMENTS mh1 Model handle of the source model.mh2 Model handle of the destination model.user_connection If TRUE, the connection will be a user (unresolved) con-

nection.

DESCRIPTION Adds or updates a connection to the internal connlist. The index into the conn list of the new or updated connection is returned. If the connection already

CsTVIBInfoCsTVIBInfo::add_icon

58 Map APIReference

exists, the direction is updated and the connection type is changed to a resolved connection (if specified as resolved).

A -1 is returned if mh1 or mh2 cannot be found in the internal iib list.

The internal iib list and conn list must have been initialized first, perhaps using create_iib_list/create_conn_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::add_icon SYNOPSIS CsTulong add_icon( CsModelHandle mh, CsMTypeHandle mth,

IconClass_e icon_type, CsTboolean place )

ARGUMENTS mh The model handle of the icon being added to the list.mth The model type handle of the icon being added to the

list.icon_type The type of icon (e.g. CsICOPR or CsICICON).place If TRUE, place the icon at some x,y.

DESCRIPTION Creates an icon with the specified values and appends it to the end of the list. Icons at the end of the list are displayed on top of all other overlapping icons. The icon's index into the list is returned, whether the icon was added or just found in the list.

If place is TRUE, the icon is placed using the start_x, start_y, x_rowoffset, y_rowoffset, vds size values to place the icon in the first grid position that isn't occupied.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

If the icon already exists in the list, it will not be added again, but if the icon's type is currently CsICOPR and the passed icon_type is CsICICOn, it's icon_type will be changed.

FUNCTION CsTVIBInfo::create_conn_list SYNOPSIS void create_conn_list( const CsTuchar * packed_msg, const

CsTuchar ** next_byte )

ARGUMENTS packed_msg Byte stream to pack the icon list into.next_byte Returns a pointer to first byte after the object's data.

Can be 0.

DESCRIPTION Unpack constructor for the tvib's internal CsConnectionList. If packed_msg is 0, an empty connection list is ceated. Data read from the TVIB_Connection_List attribute, should be unpacked something line this:

if ( vals->get_error( /*index=*/0 ) == CsError::SUCCESS )tvib_info.create_conn_list(

(CsTuchar *)vals->get_val( /*index=*/0 ) );

9032524 E2 59

CsTVIBInfo

CsTVIBInfo::create_iib_list

FUNCTION CsTVIBInfo::create_iib_list SYNOPSIS void create_iib_list( const CsTuchar * packed_msg, const

CsTuchar ** next_byte )

ARGUMENTS packed_msg Byte stream to pack the icon list into.next_byte Returns a pointer to first byte after the object's data.

Can be 0.

DESCRIPTION Unpack constructor for the tvib's internal CsIIBList. If packed_msg is 0, an empty iib list is ceated. Data read from the VIB_IIB_List attribute, should be unpacked something line this:

if ( vals->get_error( /*index=*/0 ) == CsError::SUCCESS )tvib_info.create_iib_list(

(CsTuchar *)vals->get_val( /*index=*/0 ) );

FUNCTION CsTVIBInfo::find_icon SYNOPSIS long find_icon( CsModelHandle mh ) const

ARGUMENTS mh Target model handle.

DESCRIPTION Searchs the internal iiblist and returns the index into the iib list of the icon with the given CsModelHandle. If a match is not found it returns a -1.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::find_next_connection SYNOPSIS CsModelHandle find_next_connection( CsModelHandle mh,

CsModelHandle starting_point ) const

ARGUMENTS mh The handle of one of the models involved in the connec-tion.

starting_point The handle of the other model involved in the connec-tion, at which the search should begin. If a CS_NULL_MODEL_HANDLE is received then the search starts at the beginning.

DESCRIPTION Returns the next model which is connected to the passed mh. The search is started at starting_point, or from the beginning if starting_point is CS_NULL_MODEL_HANDLE. If no more connections exist, CS_NULL_MODEL_HANDLE is returned.

The internal iib list and conn list must have been initialized first, perhaps using create_iib_list/create_conn_list or a derived class's method that creates the list.

CsTVIBInfoCsTVIBInfo::get_connlist

60 Map APIReference

FUNCTION CsTVIBInfo::get_connlist SYNOPSIS CsConnectionList * get_connlist( void ) const

DESCRIPTION Returns the internal connection list. See the note with get_iiblist() regarding accessing these classes.

FUNCTION CsTVIBInfo::get_iib_list_count SYNOPSIS CsTulong get_iib_list_count( void ) const

DESCRIPTION Returns the number of entries in the internal iib list.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::get_iiblist SYNOPSIS CsIIBList * get_iiblist( void ) const

DESCRIPTION Returns the internal iib list. Note that, when possible, you should use the access methods provided by CsTVIBInfo class to modify the CsIIBList or CsConnectionList classes, rather than modifying the iiblist directly. The CsConnectionList contains ferecnes to CsIIBList indeces, and the CsTVIBInfo methods maintain the consistency between those two classes.

FUNCTION CsTVIBInfo::get_iiblist_icon_type SYNOPSIS IconClass_e get_iiblist_icon_type( CsTulong iib_list_index )

const

ARGUMENTS iib_list_index Index into the iib list.

DESCRIPTION Returns the icon type of the iib list entry specified by iib list index.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::get_iiblist_icon_type SYNOPSIS IconClass_e get_iiblist_icon_type( CsModelHandle mh ) const

ARGUMENTS mh Target model handle.

DESCRIPTION Returns the icon type of the model specified. If no icon can be found with that mh, CsICUNKNOWN is returned.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

9032524 E2 61

CsTVIBInfo

CsTVIBInfo::get_iiblist_model

FUNCTION CsTVIBInfo::get_iiblist_model SYNOPSIS CsModelHandle get_iiblist_model( CsTulong iib_list_index )

const

ARGUMENTS iib_list_index Index into the iib list.

DESCRIPTION Returns the handle of the iib list entry specified by iib list index.

The internal iib list must have been initialized first, perhaps using create_iib_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::is_user_connection SYNOPSIS CsTboolean is_user_connection( CsTulong conn_list_index )

const

ARGUMENTS conn_list_index Index into the internal conn list.

DESCRIPTION Returns TRUE if the specified connection is a user (unresolved) connection or FALSE if the connection is an auto (resolved) connection. Resolved connections are typically displayed as live pipes.

The internal conn list must have been initialized first, perhaps using create_conn_list or a derived class's method that creates the conn list.

FUNCTION CsTVIBInfo::move_icon SYNOPSIS void move_icon( CsModelHandle mh, CsTulong dest_iib_index )

ARGUMENTS mh Model handle of the icon to move.dest_iib_index Specifies the icon's destination index in the iib list.

DESCRIPTION Moves the specified icon in the iib list and updates connection list references. The dest_iib_index must be in the range 0..get_iib_list_count()-1.

The internal iib list and conn list must have been initialized first, perhaps using create_iib_list/create_conn_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::remove_connection SYNOPSIS void remove_connection( CsModelHandle mh1, CsModelHandle mh2

)

ARGUMENTS mh1 Handle of a model in the connection.mh2 Handle of the connection's other model or

CS_NULL_MODEL_HANDLE.

DESCRIPTION Removes a connection from the internal connlist. If mh2 is CS_NULL_MODEL_HANDLE, then all connections with mh1 in them are removed.

CsTVIBInfoCsTVIBInfo::remove_icon

62 Map APIReference

The internal iib list and conn list must have been initialized first, perhaps using create_iib_list/create_conn_list or a derived class's method that creates the list.

FUNCTION CsTVIBInfo::remove_icon SYNOPSIS void remove_icon( CsModelHandle mh )

ARGUMENTS mh The model handle of the icon to remove.

DESCRIPTION Removes and deletes the specified icon from the iib list and updates connection list references.

The internal iib list and conn list must have been initialized first, perhaps using create_iib_list/create_conn_list or a derived class's method that creates the list.

9032524 E2 63

CsZoomList

CsZoomList::CsZoomList

CLASS CsZoomListBASE CLASS None

DESCRIPTION This class represents all the zoomed items in the view. It has a list of zoomed items and knows how to read from and write to a packed octet attribute in the database.

A packed CsBuffer of this object is stored in the zoomedList (0x11d86) attribute to store icon and annotation zoom levels for a map view. This class is also packed into the CsPackedVib object.

METHODS

FUNCTION CsZoomList::CsZoomList SYNOPSIS CsZoomList( void )

DESCRIPTION Default constructor for CsZoomList.

FUNCTION CsZoomList::CsZoomList SYNOPSIS CsZoomList( const CsTuchar *packed_msg, const CsTuchar

**next_byte )

ARGUMENTS packed_msg Pointer to the packed structure. next_byte Pointer to the byte after the structure is returned.

DESCRIPTION Unpack Constructor for CsZoomList. If the data was read from the zoomedList attribute, it should be unpacked something line this:

if ( vals->get_error( /*index=*/0 ) == CsError::SUCCESS ){ CsBuffer *zoom_buf = (CsBuffer *)vals->get_val( /*index=*/0; if ( zoom_buf->get_length() > 0 ) { const CsTuchar *zoom_data = zoom_buf->get_data(); zoomList = new CsZoomList( zoom_data, (const CsTuchar**)&zoom_data ); } }

FUNCTION CsZoomList::CsZoomList SYNOPSIS CsZoomList( const CsZoomList & zoom_list )

CsZoomListCsZoomList::~CsZoomList

64 Map APIReference

ARGUMENTS zoom_list Object to copy.

DESCRIPTION Copy constructor for CsZoomList. Does a deep copy of zoomed items.

FUNCTION CsZoomList::~CsZoomList SYNOPSIS ~CsZoomList( void )

DESCRIPTION Destructor for CsZoomList.

FUNCTION CsZoomList::AddItem SYNOPSIS void AddItem( CsZoomedItem *item )

ARGUMENTS item Item to be added.

DESCRIPTION Adds an item to the end of the list and takes ownership of the memory.

FUNCTION CsZoomList::ClearList SYNOPSIS void ClearList( void )

DESCRIPTION Removes all items from the list and deletes them.

FUNCTION CsZoomList::GetCount SYNOPSIS int GetCount( void ) const

DESCRIPTION Returns the number of items in the zoomed list.

RETURNS int

FUNCTION CsZoomList::GetItem SYNOPSIS CsZoomedItem * GetItem( int index ) const

ARGUMENTS index Index into the zoomed list. It is zero-based.

DESCRIPTION Returns the zoomed item at a particular index. Index must be in the range 0..GetCount()-1.

RETURNS CsZoomedItem *

FUNCTION CsZoomList::GetItem SYNOPSIS CsZoomedItem * GetItem( CsTulong handle,

CsZoomedItem::CsZoomedItemType type ) const

9032524 E2 65

CsZoomList

CsZoomList::Pack

ARGUMENTS handle Handle of the item. type Type of the item.

DESCRIPTION Returns the item in the zoomed list that matches the handle and type. If nothing found, 0 is returned

RETURNS CsZoomedItem *

FUNCTION CsZoomList::Pack SYNOPSIS CsTuchar* Pack( CsTuchar *buf ) const

ARGUMENTS buf Array where the structure is packed.

DESCRIPTION Packs the zoom list into the passed byte stream. Returns a pointer to the first byte in packed_msg after the packed object.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the zoomedList attribute should be done using PackBuffer().

RETURNS CsTuchar *

FUNCTION CsZoomList::PackBuffer SYNOPSIS CsBuffer * PackBuffer( void ) const

DESCRIPTION Packs the zoom list and returns it in an allocated CsBuffer. The caller is responsible for freeing the returned memory. This method is useful for writing the zoomedList attribute as follows:

CsAttrValList * vals = new CsAttrValList( 1 );vals->set_val( 0, /*zoomedList*/0x11d86,

zoomed_list->PackBuffer(), CsAttrDesc::OCTET_STRING );CsUIModelHandle * ui_mh = new CsUIModelHandle( mh );write_id = ui_mh->write_async( vals, (CsMailClient*)this );

FUNCTION CsZoomList::PackLength SYNOPSIS CsTulong PackLength( void ) const

DESCRIPTION Returns the number of bytes needed to pack this zoom list.

This method is generally not called by applications as the CsPackedVib class calls this method internally and writing to the zoomedList attribute should be done using PackBuffer().

RETURNS CsTulong

FUNCTION CsZoomList::RemoveItem SYNOPSIS void RemoveItem( CsZoomedItem *item )

CsZoomListCsZoomList::RemoveItem

66 Map APIReference

ARGUMENTS item Zoomed item to be removed.

DESCRIPTION Removes the item from the list and deletes it.

9032524 E2 67

CsZoomedItem

CsZoomedItem::CsZoomedItem

CLASS CsZoomedItemBASE CLASS None

DESCRIPTION This class abstracts a zoomed item in the view. The following information about the item is stored: handle, type, and zoom value. The handle is the model handle for the icons and index into the display list for the annotation. Type is either an icon or an annotation. Zoomed value is a value relative to the view's zooming.

METHODS

FUNCTION CsZoomedItem::CsZoomedItem SYNOPSIS CsZoomedItem( CsTulong hdl, double zoom_value,

CsZoomedItem::CsZoomedItemType item_type )

ARGUMENTS hdl Handle for the item.zoom_value Zoom value of the item. item_type Type of the item.

DESCRIPTION Constructor for CsZoomedItem.

FUNCTION CsZoomedItem::~CsZoomedItem SYNOPSIS ~CsZoomedItem( void )

DESCRIPTION Destructor for CsZoomedItem.

FUNCTION CsZoomedItem::GetHandle SYNOPSIS CsTulong GetHandle( void ) const

DESCRIPTION Returns the handle for the item — the model handle if the item is an icon, the index to the display list if the item is an annotation.

RETURNS CsTulong

FUNCTION CsZoomedItem::GetItemType SYNOPSIS CsZoomedItem::CsZoomedItemType GetItemType( void ) const

DESCRIPTION Returns the type of the item. It is either an ICON or ANNOTATION

RETURNS CsZoomedItem::CsZoomedItemType

CsZoomedItemCsZoomedItem::GetZoomValue

68 Map APIReference

EFUNCTION CsZoomedItem::GetZoomValue SYNOPSIS double GetZoomValue( void ) const

DESCRIPTION Returns the zoomed value of the item. This value is relative to the view's zooming level.

RETURNS double.

FUNCTION CsZoomedItem::SetHandle SYNOPSIS void SetHandle( CsTulong hdl )

ARGUMENTS hdl Handle for the item.

DESCRIPTION Sets the handle for the item — the model handle if the item is an icon, the index to the display list if the item is an annotation.

FUNCTION CsZoomedItem::SetItemType SYNOPSIS void SetItemType( CsZoomedItem::CsZoomedItemType item_type )

ARGUMENTS item_type Type of the item.

DESCRIPTION Sets the item type.

FUNCTION CsZoomedItem::SetZoomValue SYNOPSIS void SetZoomValue( double z_v )

ARGUMENTS z_v Zoom value for the item.

DESCRIPTION Sets the zoom value for the item. 1.0 is 100%.


Recommended