Gnash  0.8.11dev
TextField_as.h
Go to the documentation of this file.
1 // TextField_as.h: ActionScript 3 "TextField" class, for Gnash.
2 //
3 // Copyright (C) 2009, 2010, 2011, 2012
4 // Free Software Foundation, Inc.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 //
20 
21 #ifndef GNASH_ASOBJ3_TEXTFIELD_AS_H
22 #define GNASH_ASOBJ3_TEXTFIELD_AS_H
23 
24 namespace gnash {
25 
26 class as_object;
27 struct ObjectURI;
28 class Global_as;
29 
31 //
33 as_object* createTextFieldObject(Global_as& gl);
34 
36 void textfield_class_init(as_object& global, const ObjectURI& uri);
37 
38 void registerTextFieldNative(as_object& global);
39 
40 } // namespace gnash
41 
42 // end of GNASH_ASOBJ3_TEXTFIELD_H
43 #endif
44 
45 // local Variables:
46 // mode: C++
47 // indent-tabs-mode: t
48 // End:
49 
gnash::TextField::AUTOSIZE_CENTER
@ AUTOSIZE_CENTER
Expand TextField, anchor the horizontal center.
Definition: TextField.h:89
TextField_as.h
gnash::isNativeType
bool isNativeType(const as_object *obj, T *&relay)
Check whether the object is an instance of a known type.
Definition: as_object.h:875
gnash::toNumber
double toNumber(const as_value &v, const VM &vm)
Convert an as_value to a double.
Definition: VM.cpp:451
Movie.h
name
std::string name
Definition: LocalConnection_as.cpp:149
gnash::toBool
bool toBool(const as_value &v, const VM &vm)
Convert an as_value to boolean type.
Definition: VM.cpp:445
height
@ height
Definition: klash_part.cpp:329
gnash::toInt
std::int32_t toInt(const as_value &v, const VM &vm)
AS2-compatible conversion to 32bit integer.
Definition: VM.cpp:463
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
gnash::NSV::CLASS_TEXT_FORMAT
@ CLASS_TEXT_FORMAT
Definition: namedStrings.h:250
gnash::toObject
as_object * toObject(const as_value &v, VM &vm)
Convert an as_value to an object.
Definition: VM.cpp:457
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
y
std::int32_t y
Definition: BitmapData_as.cpp:435
LOG_ONCE
#define LOG_ONCE(x)
Definition: log.h:49
gnash::pixelsToTwips
std::int32_t pixelsToTwips(double a)
Definition: GnashNumeric.h:144
_
#define _(String)
Definition: log.h:44
gnash::as_environment
Provides information about timeline context.
Definition: as_environment.h:51
gnash::as_object::init_member
void init_member(const std::string &name, const as_value &val, int flags=DefaultFlags)
Initialize a member value by string.
Definition: as_object.cpp:669
gnash::VM
The AVM1 virtual machine.
Definition: VM.h:72
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::NSV::PROP_TEXT_HEIGHT
@ PROP_TEXT_HEIGHT
Definition: namedStrings.h:188
gnash::key::s
@ s
Definition: GnashKey.h:165
NativeFunction.h
gnash::key::n
@ n
Definition: GnashKey.h:160
start
@ start
Definition: klash_part.cpp:330
Global_as.h
gnash::TextField::AUTOSIZE_RIGHT
@ AUTOSIZE_RIGHT
Expand TextField, anchor the top-right side.
Definition: TextField.h:92
gnash::getGlobal
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
gnash::twipsToPixels
double twipsToPixels(int i)
Definition: GnashNumeric.h:97
gnash::getVM
VM & getVM(const as_environment &env)
Definition: as_environment.h:222
gnash::NSV::CLASS_TEXT_FIELD
@ CLASS_TEXT_FIELD
Definition: namedStrings.h:248
UNUSED
#define UNUSED(x)
Definition: utility.h:113
AsBroadcaster.h
gnash::textfield_class_init
void textfield_class_init(as_object &where, const ObjectURI &uri)
This provides the prototype and static methods for TextField.
Definition: TextField_as.cpp:105
gnash::getMember
as_value getMember(as_object &o, const ObjectURI &uri)
Get a member of an object using AS lookup rules.
Definition: as_object.h:756
gnash::createObject
as_object * createObject(const Global_as &gl)
Definition: Global_as.cpp:303
gnash::NSV::PROP_PUSH
@ PROP_PUSH
Definition: namedStrings.h:88
gnash::as_object::DefaultFlags
static const int DefaultFlags
The most common flags for built-in properties.
Definition: as_object.h:192
gnash::callMethod
as_value callMethod(fn_call::Args &args, as_object *obj, const ObjectURI &uri)
Call a member function of this object in an AS-compatible way.
Definition: Global_as.h:219
gnash::fontlib::get_font
Font * get_font(const std::string &name, bool bold, bool italic)
Definition: fontlib.cpp:50
gnash::fn_call::Args
FunctionArgs< as_value > Args
Definition: fn_call.h:121
gnash::Global_as::createClass
as_object * createClass(Global_as::ASFunction ctor, as_object *prototype)
Create an ActionScript class.
Definition: Global_as.cpp:180
gnash::as_value::to_function
as_function * to_function() const
Return the value as a function only if it is a function.
Definition: as_value.cpp:499
gnash::FunctionArgs
A class to contain transferable arguments for a fn_call.
Definition: fn_call.h:57
IF_VERBOSE_ASCODING_ERRORS
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
gnash::registerTextFieldNative
void registerTextFieldNative(as_object &global)
Definition: TextField_as.cpp:123
gnash::constructInstance
as_object * constructInstance(as_function &ctor, const as_environment &env, fn_call::Args &args)
Definition: as_function.cpp:47
gnash::VM::registerNative
void registerNative(as_c_function_ptr fun, unsigned int x, unsigned int y)
Definition: VM.cpp:268
MovieClip.h
GnashNumeric.h
Font.h
gnash::NSV::PROP_uLISTENERS
@ PROP_uLISTENERS
Definition: namedStrings.h:107
gnash::TextField::typeInvalid
@ typeInvalid
Invalid value.
Definition: TextField.h:99
gnash::as_value
ActionScript value type.
Definition: as_value.h:95
gnash::NSV::PROP_TEXT_WIDTH
@ PROP_TEXT_WIDTH
Definition: namedStrings.h:189
gnash::TextField::AUTOSIZE_NONE
@ AUTOSIZE_NONE
Do not automatically resize TextField as text grow/shrink.
Definition: TextField.h:83
gnash::Global_as::createArray
as_object * createArray()
Construct an Array.
Definition: Global_as.cpp:207
gnash::PropFlags::onlySWF7Up
@ onlySWF7Up
Only visible by VM initialized for version 7 or higher.
Definition: PropFlags.h:51
gnash::NSV::PROP_AS_SET_PROP_FLAGS
@ PROP_AS_SET_PROP_FLAGS
Definition: namedStrings.h:137
gnash::TextField::TypeValue
TypeValue
Possible type values.
Definition: TextField.h:96
gnash::log_aserror
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
gnash::AsBroadcaster::initialize
static void initialize(as_object &obj)
Initialize the given object as an AsBroadcaster.
Definition: AsBroadcaster.cpp:145
log.h
gnash::TextField::AutoSize
AutoSize
Possible autoSize values.
Definition: TextField.h:80
utf8.h
fn_call.h
gnash::PropFlags::onlySWF6Up
@ onlySWF6Up
Only visible by VM initialized for version 6 or higher.
Definition: PropFlags.h:45
gnash::key::f
@ f
Definition: GnashKey.h:152
TextField.h
gnash::image::end
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
gnash::TextField::AUTOSIZE_LEFT
@ AUTOSIZE_LEFT
Expand TextField, anchor the top-left side.
Definition: TextField.h:86
namedStrings.h
gnash::Global_as
The Global object ultimately contains all objects in an ActionScript run.
Definition: Global_as.h:50
gnash::getSWFVersion
int getSWFVersion(const as_environment &env)
Definition: as_environment.cpp:657
test.uri
uri
Definition: test.py:12
gnash::utf8::decodeCanonicalString
std::wstring decodeCanonicalString(const std::string &str, int version)
Converts a std::string with multibyte characters into a std::wstring.
Definition: utf8.cpp:39
gnash::getURI
ObjectURI getURI(const VM &vm, const std::string &str, bool lowerCaseHint=false)
Definition: VM.h:290
gnash::createTextFieldObject
as_object * createTextFieldObject(Global_as &gl)
Native function to create a plain object with TextField properties.
Definition: TextField_as.cpp:89
TextFormat_as.h
gnash::key::o
@ o
Definition: GnashKey.h:161
width
@ width
Definition: klash_part.cpp:329
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::ObjectURI
A URI for describing as_objects.
Definition: ObjectURI.h:45
x
std::int32_t x
Definition: BitmapData_as.cpp:434
gnash::as_function
ActionScript Function, either builtin or SWF-defined.
Definition: as_function.h:63
fontlib.h