summaryrefslogtreecommitdiff
path: root/Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-24 05:38:13 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-24 05:38:13 +0000
commitde4ef8a65afd0c38f8bbdfcb3b90ff82a98d1483 (patch)
treefeefeaeb3734eaebdb5872609606edc84d6f8fa3 /Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp
parentbe94a568ef65120465b49f5c6db90cd4ec3c3eb2 (diff)
skins: fix for floats and added valign (not used yet)
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@133 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp')
-rw-r--r--Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp b/Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp
index 6eb4a39..cf11fdb 100644
--- a/Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp
+++ b/Plugins/skins/SkinLib/TextFieldState_v8_wrapper.cpp
@@ -51,59 +51,9 @@ static void Set_TextFieldState_text(Local<String> property, Local<Value> value,
}
-static Handle<Value> Get_TextFieldState_hAlign(Local<String> property, const AccessorInfo &info)
-{
- HandleScope scope;
-
- Local<Object> self = info.Holder();
- Local<External> wrap = Local<External>::Cast(self->GetInternalField(0));
- if (wrap.IsEmpty())
- return scope.Close( Undefined() );
-
- TextFieldState *tmp = (TextFieldState *) wrap->Value();
- if (tmp == NULL)
- return scope.Close( Undefined() );
-
- switch(tmp->getHAlign())
- {
- case LEFT: return scope.Close( String::New((const V8_TCHAR *) _T("LEFT")) );
- case CENTER: return scope.Close( String::New((const V8_TCHAR *) _T("CENTER")) );
- case RIGHT: return scope.Close( String::New((const V8_TCHAR *) _T("RIGHT")) );
- }
- return scope.Close( Undefined() );
-}
-
-static void Set_TextFieldState_hAlign(Local<String> property, Local<Value> value, const AccessorInfo& info)
-{
- HandleScope scope;
-
- Local<Object> self = info.Holder();
- Local<External> wrap = Local<External>::Cast(self->GetInternalField(0));
- if (wrap.IsEmpty())
- return;
-
- TextFieldState *tmp = (TextFieldState *) wrap->Value();
- if (tmp == NULL)
- return;
-
- if (!value.IsEmpty() && value->IsString())
- {
- String::Utf8Value utf8_value(value);
- Utf8ToTchar tval(*utf8_value);
- if ( lstrcmpi(_T("LEFT"), tval) == 0)
- tmp->setHAlign(LEFT);
- else if ( lstrcmpi(_T("CENTER"), tval) == 0)
- tmp->setHAlign(CENTER);
- else if ( lstrcmpi(_T("RIGHT"), tval) == 0)
- tmp->setHAlign(RIGHT);
- }
-}
-
-
void AddTextFieldStateAcessors(Handle<ObjectTemplate> &templ)
{
HandleScope scope;
templ->SetAccessor(String::New("text"), Get_TextFieldState_text, Set_TextFieldState_text);
- templ->SetAccessor(String::New("hAlign"), Get_TextFieldState_hAlign, Set_TextFieldState_hAlign);
}