Back to index

im-sdk  12.3.91
lookup.h
Go to the documentation of this file.
00001 /*
00002   lookup.h
00003   Copyright (C) 2003 Free Standards Group
00004 
00005   Permission is hereby granted, free of charge, to any person obtaining a
00006   copy of this software and associated documentation files (the
00007   "Software"), to deal in the Software without restriction, including
00008   without limitation the rights to use, copy, modify, merge, publish,
00009   distribute, sublicense, and/or sell copies of the Software, and to
00010   permit persons to whom the Software is furnished to do so, subject to
00011   the following conditions: The above copyright notice and this
00012   permission notice shall be included in all copies or substantial
00013   portions of the Software.
00014 
00015   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00016   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00017   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00018   IN NO EVENT SHALL OPENI18N WG OR FREE STANDARDS GROUP. BE LIABLE
00019   FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
00020   CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
00021   THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
00022   ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
00023 
00024   Except as contained in this notice, the names of OpenI18N WG and/or
00025   Free Standards Group shall not be used in advertising or otherwise to
00026   promote the sale, use or other dealings in this Software without prior
00027   written authorization from OpenI18N WG and/or Free Standards Group
00028   as applicable.
00029 
00030   Author: ILGYOUNG PARK <Karl.Park@Sun.COM>
00031          TuBo <Gavin.Tu@Sun.COM>
00032 
00033 */
00034 #include <qwidget.h>
00035 #include <qlistbox.h>
00036 #include <qvbox.h>
00037 #include <qlistview.h>
00038 #include <qlabel.h>
00039 #include <qlayout.h>
00040 
00041 #include "iiimqccontext.h"
00042 
00043 class QLabel;
00044 
00045 
00046 class IIIMQCFLookup  
00047 {
00048  public:
00049   IIIMQCFLookup(QWidget *w, IIIMInputContext *ic);
00050   virtual ~IIIMQCFLookup ();
00051 
00052   void showLookupWindow (QWidget *w);
00053   void hideLookupWindow (void);
00054   void setLookupChoices (QStringList &lc,
00055                       int size,
00056                       int first_index,
00057                       int last_index,
00058                       int current_index);
00059   void clearLookupChoices (void);
00060   void setLookupTitle(QString);
00061   void layoutWindow(int x, int y, int w, int h);
00062   QPoint forceInside(const QRect &enclosure, const QRect &prisoner);
00063   bool isVisible () const;
00064   void updateLabel(QString);
00065   void adjustLookupWindowSize();
00066  private:
00067   QVBox *vbox;
00068   QListBox *lw;
00069   QLabel   *numLabel;
00070   int nrCandidates;
00071   int candidateIndex;
00072   int pageIndex;
00073 
00074   IIIMInputContext *iiimqc;
00075 };