/***************************************************************************
 *   Copyright (C) 2003-2005 by liuspider                                  *
 *   liuspider@users.sourceforge.net                                       *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 **************************************************************************/
#ifndef SCIMSTRINGLISTITEM_H
#define SCIMSTRINGLISTITEM_H

#include "config.h"
#define Uses_SCIM_ATTRIBUTE
#include <scim.h>

#include "scimstringrender.h"
#include <qframe.h>
/**
@author liuspider
*/
class ScimStringListItem : public QFrame, public ScimStringRender
{
Q_OBJECT
public:
    ScimStringListItem(QWidget *parent = 0, const char *name = 0);

    ~ScimStringListItem();
    void setHighlight(bool);
    void setEnableMouse(bool);
    virtual QSize minimumSizeHint () const;
    virtual QSize sizeHint() const;
public slots:
    void setText(const QString &, const scim::AttributeList &);
signals:
    void selected(int);
    void highlighted(int);
protected:
    virtual void fontChange(const QFont & oldFont);
    virtual void drawContents( QPainter * );
    virtual void mousePressEvent( QMouseEvent * );
    virtual void mouseMoveEvent( QMouseEvent * );
private:
//     int index;
    bool enableMouse;
    class ScimStringListItemPrivate * d;
};

#endif
