// (C) 2005 Max Howell (max.howell@methylblue.com)
// See COPYING file for licensing information

#ifndef CODEINE_ADJUST_SIZE_BUTTON_H
#define CODEINE_ADJUST_SIZE_BUTTON_H

#include <tqframe.h>

namespace Codeine
{
   class AdjustSizeButton : public TQFrame
   {
      int m_counter;
      int m_stage;
      int m_offset;
      int m_timerId;

      TQWidget *m_preferred;
      TQWidget *m_oneToOne;

      TQFrame *m_thingy;

   public:
      AdjustSizeButton( TQWidget *parent );

   private:
      virtual void timerEvent( TQTimerEvent* );
      virtual bool eventFilter( TQObject*, TQEvent* );

      inline void move()
      {
         TQWidget::move( parentWidget()->width() - width(), parentWidget()->height() - m_offset );
      }
   };
}

#endif
