Home | History | Annotate | Download | only in wml
      1 /**
      2  * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
      3  *
      4  * This library is free software; you can redistribute it and/or
      5  * modify it under the terms of the GNU Library General Public
      6  * License as published by the Free Software Foundation; either
      7  * version 2 of the License, or (at your option) any later version.
      8  *
      9  * This library is distributed in the hope that it will be useful,
     10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12  * Library General Public License for more details.
     13  *
     14  * You should have received a copy of the GNU Library General Public License
     15  * along with this library; see the file COPYING.LIB.  If not, write to
     16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     17  * Boston, MA 02110-1301, USA.
     18  *
     19  */
     20 
     21 #ifndef WMLDoElement_h
     22 #define WMLDoElement_h
     23 
     24 #if ENABLE(WML)
     25 #include "WMLElement.h"
     26 
     27 namespace WebCore {
     28 
     29 class WMLTaskElement;
     30 
     31 class WMLDoElement : public WMLElement {
     32 public:
     33     static PassRefPtr<WMLDoElement> create(const QualifiedName& tagName, Document*);
     34 
     35     WMLDoElement(const QualifiedName& tagName, Document*);
     36 
     37     virtual void defaultEventHandler(Event*);
     38     virtual void parseMappedAttribute(Attribute*);
     39     virtual void insertedIntoDocument();
     40     virtual void removedFromDocument();
     41 
     42     virtual void attach();
     43     virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
     44     virtual void recalcStyle(StyleChange);
     45 
     46     void registerTask(WMLTaskElement*);
     47     void deregisterTask(WMLTaskElement*);
     48 
     49     bool isActive() const { return m_isActive; }
     50     String label() const;
     51     String name() const { return m_name; }
     52 
     53     void setActive(bool active) { m_isActive = active; }
     54     void setNoop(bool noop) { m_isNoop = noop;}
     55 
     56 private:
     57     WMLTaskElement* m_task;
     58     bool m_isActive;
     59     bool m_isNoop;
     60     bool m_isOptional;
     61     String m_name;
     62     String m_type;
     63 };
     64 
     65 }
     66 
     67 #endif
     68 #endif
     69