ImportCmd - import a graphical component


SYNOPSIS

       #include <Unidraw/Commands/import.h>


DESCRIPTION

       ImportCmd  imports  a graphical image from a file into the
       drawing being edited.  ImportCmd  supports  the  following
       file  formats:  TIFF;  PostScript generated by pgmtops and
       ppmtops; X bitmap format; and Unidraw format.


PUBLIC OPERATIONS

       ImportCmd(ControlInfo*, FileChooser* = nil)
       ImportCmd(Editor* = nil, FileChooser* = nil)
              Create a new ImportCmd instance, optionally supply-
              ing  the  FileChooser  that will prompt the user to
              specify the file to import.  After the user  speci-
              fies  the  file,  ImportCmd  reads  it,  creates an
              appropriate graphical component, and pastes it into
              the component being edited in the enclosing editor.

       static GraphicComp* Import(const char*)
       static GraphicComp* TIFF_Image(const char*)
       static GraphicComp* PGM_Image(const char*)
       static GraphicComp* PPM_Image(const char*)
       static GraphicComp* XBitmap_Image(const char*)
              Operations for reading data from various file  for-
              mats  and  creating an appropriate graphical compo-
              nent.   TIFF_Image,   PGM_Image,   PPM_Image,   and
              XBitmap_Image  assume that the specified file is in
              the corresponding format.  Import is more  general:
              it  determines  the  format  from the file and then
              calls one of the other functions.


PROTECTED OPERATIONS

       void Init(FileChooser*)
              Specify the FileChooser  instance  (stored  in  the
              _dialog  protected member) explicitly.  This opera-
              tion does not delete the existing instance, if any.

       GraphicComp* PostDialog()
              Post  the FileChooser and return the graphical com-
              ponent created from  the  user-specified  file,  if
              any.


SEE ALSO

       Catalog(3U),    Command(3U),   FileChooser(3I),   Graphic-
       Comp(3U), bitmap(1), pgmtops(1), ppmtops(1)





Man(1) output converted with man2html