summaryrefslogtreecommitdiff
path: root/widgettooltip.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2006-08-04 01:04:15 +0000
committerMatt Turner <mattst88@gmail.com>2006-08-04 01:04:15 +0000
commitdfa4a46bb0e6c6df9d07039fda5ef7f4309915b2 (patch)
treeac8b4cc67ff64703b4298f077e87bb4eb4334410 /widgettooltip.cpp
parent3582a80243bdd92619e737111ada5b5bf2667cd7 (diff)
git-svn-id: svn://mattst88.com/svn/skygipp/trunk@2 a71248a0-261a-0410-b604-901f7c0bd773
Diffstat (limited to 'widgettooltip.cpp')
-rw-r--r--widgettooltip.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/widgettooltip.cpp b/widgettooltip.cpp
new file mode 100644
index 0000000..9c27267
--- /dev/null
+++ b/widgettooltip.cpp
@@ -0,0 +1,47 @@
+#include <skygi/skygi.h>
+
+#include "widgettooltip.h"
+
+CTooltip::CTooltip() {
+ this->hWnd = NULL;
+ this->PopupTime = 0;
+ memset(this->Text, '\0', sizeof(this->Text));
+}
+
+HRESULT CTooltip::Create(HANDLE parent, HANDLE owner, char * text, unsigned int popuptime) {
+ this->hWnd = GI_WidgetTooltipCreate(parent, owner, text, popuptime);
+ strncpy(this->Text, text, strlen(this->Text));
+ this->PopupTime = popuptime;
+ if (this->hWnd) {
+ return S_OK;
+ }
+ return E_HANDLE;
+}
+
+HRESULT CTooltip::Enable() {
+ return GI_WidgetTooltipEnable(this->hWnd);
+}
+
+HRESULT CTooltip::Disable() {
+ return GI_WidgetTooltipDisable(this->hWnd);
+}
+
+HRESULT CTooltip::SetText(char * text) {
+ memset(this->Text, '\0', sizeof(this->Text));
+ strncpy(this->Text, text, 63);
+ return GI_WidgetTooltipSet(this->hWnd, text, this->PopupTime);
+}
+
+char * CTooltip::GetText() {
+ return this->Text;
+}
+
+HRESULT CTooltip::SetPopupTime(unsigned int popuptime) {
+ this->PopupTime = popuptime;
+ return GI_WidgetTooltipSet(this->hWnd, this->Text, popuptime);
+}
+
+unsigned int CTooltip::GetPopupTime() {
+ return this->PopupTime;
+}
+