[Classes] [Prev] [Next] [Methods]

CPicture

Methods Index

Heritage
Description
Usage
Protected Data Members
Public Methods
Constructor, Destructor, and Initializer Methods
Picture Methods
Protected Methods

CPicture


Heritage

Superclass: CSubview

Subclasses: None


Description

CPicture is a class that displays pictures.CPicture maps a CImage to a picture on the screen. XVT-Power++ uses XVT pixmaps for displaying the pictures because pixmaps are the fastest way to display images on all platforms. A pixmap is a device-dependent array of pixels that can be displayed in a window. You might use CPicture, for example, to display pictures from a database or to display icons in a toolbar.

Note: This class is not based on XVT Portability Toolkit PICTUREs.


Usage

To use this class, you pass it an image, like this:

CPicture *aPic = new CPicture(itsEncl, CPoint(0,0),
anImage);
Or, you pass it an image from a file, like this:

CPicture *aPic = new CPicture(itsEncl, CPoint(0,0),
CImage("myfile.bmp"));

aPic->SetDragging(TRUE);
aPic->SetCommand(5150);

aPic->IPicture(anImage2);
aPic->IPicture(CImage("myfile2.bmp"));

Protected Data Members

XVT_PIXMAP itsPixmap; The pixmap


Public Methods

Constructor, Destructor, and Initializer Methods

CPicture(CSubview *theEnclosure,
const CPoint &theOrigin,
const CImage &theImage);
CPicture(const CPicture &thePicture);
CPicture & operator= (const CPicture &thePicture);
virtual ~CPicture();

Picture Methods

CPicture gets most of its functionality from the wide interface provided by CView and CSubview. For more information on the "wide interface," see the "Views and Subviews" chapter in the Guide to XVT Development Solution to C++.

void IPicture(const CImage &theImage);
virtual void Draw(const CRect &theClippingRegion);
 virtual void SetEnclosure(CSubview* theEnclosure);

Protected Methods

virtual XVT_PIXMAP GetPixmapFromImage(
const CImage &theImage);


[Classes] [Prev] [Next] [Methods]

support@xvt.com


Visit our online help desk for tech support

Copyright © 2009, Providence Software Solutions Inc. All rights reserved.