aseprite/src/ui/int_entry.h

49 lines
889 B
C
Raw Normal View History

// Aseprite UI Library
2013-03-31 00:11:35 +08:00
// Copyright (C) 2001-2013 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
2013-03-31 00:11:35 +08:00
#ifndef UI_INT_ENTRY_H_INCLUDED
#define UI_INT_ENTRY_H_INCLUDED
2014-03-30 06:40:17 +08:00
#pragma once
2013-03-31 00:11:35 +08:00
#include "ui/entry.h"
namespace ui {
class CloseEvent;
2013-03-31 00:11:35 +08:00
class PopupWindow;
class Slider;
class IntEntry : public Entry {
2013-03-31 00:11:35 +08:00
public:
IntEntry(int min, int max);
~IntEntry();
int getValue() const;
void setValue(int value);
protected:
bool onProcessMessage(Message* msg) OVERRIDE;
void onEntryChange() OVERRIDE;
// New events
virtual void onValueChange();
private:
void openPopup();
void closePopup();
void onChangeSlider();
void onPopupClose(CloseEvent& ev);
2013-03-31 00:11:35 +08:00
int m_min;
int m_max;
PopupWindow* m_popupWindow;
Slider* m_slider;
};
} // namespace ui
#endif