00001 /*************************************************************************** 00002 *cr 00003 *cr (C) Copyright 1995-2019 The Board of Trustees of the 00004 *cr University of Illinois 00005 *cr All Rights Reserved 00006 *cr 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * RCS INFORMATION: 00011 * 00012 * $RCSfile: Pickable.h,v $ 00013 * $Author: johns $ $Locker: $ $State: Exp $ 00014 * $Revision: 1.34 $ $Date: 2019/01/17 21:21:01 $ 00015 * 00016 *************************************************************************** 00017 * DESCRIPTION: 00018 * 00019 * A Pickable object is one which contains data which may be selected by 00020 * using a pointer device in an open DisplayDevice. Each Pickable registers 00021 * itself with a PickList object which indicates it has items in its 00022 * drawing list which may be picked, and which indicates it should be told 00023 * when something has been successfully selected. There are one or many 00024 * picking modes, which are represented by derivations of the PickMode class. 00025 * When picking is done, it is done while in a current pick mode, which 00026 * controls what to do with the information. 00027 * 00028 * A Pickable must provide versions of virtual routines which tell what 00029 * pick modes the object is interested in. 00030 ***************************************************************************/ 00031 #ifndef PICKABLE_H 00032 #define PICKABLE_H 00033 00034 class PickMode; 00035 class DisplayDevice; 00036 class VMDDisplayList; 00037 00039 class Pickable { 00040 public: 00041 Pickable() {} 00042 virtual ~Pickable() {} 00043 00045 virtual VMDDisplayList *pick_cmd_list() { return 0; } 00046 00048 virtual int pickable_on() { return 1; } 00049 00050 // 00051 // public virtual pick action routines 00052 // 00053 00056 virtual void pick_start(PickMode *, DisplayDevice *, 00057 int /* btn */, int /* tag */, 00058 const int *cell /* [3] */, 00059 int /* dim */, const float *) {} 00060 virtual void pick_move (PickMode *, DisplayDevice *, 00061 int /* tag */, int /* dim */, const float *) {} 00062 virtual void pick_end (PickMode *, DisplayDevice *) {} 00063 }; 00064 00065 #endif 00066