innerWidth Window::InnerWidth DontDelete|ReadOnly
length Window::Length DontDelete|ReadOnly
location Window::_Location DontDelete
+ locationbar Window::Locationbar DontDelete
name Window::Name DontDelete
navigator Window::_Navigator DontDelete|ReadOnly
clientInformation Window::ClientInformation DontDelete|ReadOnly
konqueror Window::_Konqueror DontDelete|ReadOnly
+ menubar Window::Menubar DontDelete|ReadOnly
offscreenBuffering Window::OffscreenBuffering DontDelete|ReadOnly
opener Window::Opener DontDelete|ReadOnly
outerHeight Window::OuterHeight DontDelete|ReadOnly
screenLeft Window::ScreenLeft DontDelete|ReadOnly
screenTop Window::ScreenTop DontDelete|ReadOnly
scrollbars Window::Scrollbars DontDelete|ReadOnly
+ statusbar Window::Statusbar DontDelete|ReadOnly
+ toolbar Window::Toolbar DontDelete|ReadOnly
scroll Window::Scroll DontDelete|Function 2
scrollBy Window::ScrollBy DontDelete|Function 2
scrollTo Window::ScrollTo DontDelete|Function 2
IMPLEMENT_PROTOFUNC(WindowFunc)
Window::Window(KHTMLPart *p)
- : ObjectImp(/*no proto*/), m_part(p), screen(0), history(0), frames(0), loc(0), m_selection(0), m_evt(0)
+ : ObjectImp(/*no proto*/)
+ , m_part(p)
+ , screen(0)
+ , history(0)
+ , frames(0)
+ , loc(0)
+ , m_selection(0)
+ , m_locationbar(0)
+ , m_menubar(0)
+ , m_personalbar(0)
+ , m_scrollbars(0)
+ , m_statusbar(0)
+ , m_toolbar(0)
+ , m_evt(0)
{
winq = new WindowQObject(this);
//kdDebug(6070) << "Window::Window this=" << this << " part=" << m_part << " " << m_part->name() << endl;
return m_selection;
}
+BarInfo *Window::locationbar(ExecState *exec) const
+{
+ if (!m_locationbar)
+ const_cast<Window*>(this)->m_locationbar = new BarInfo(exec, m_part, BarInfo::Locationbar);
+ return m_locationbar;
+}
+
+BarInfo *Window::menubar(ExecState *exec) const
+{
+ if (!m_menubar)
+ const_cast<Window*>(this)->m_menubar = new BarInfo(exec, m_part, BarInfo::Menubar);
+ return m_menubar;
+}
+
+BarInfo *Window::personalbar(ExecState *exec) const
+{
+ if (!m_personalbar)
+ const_cast<Window*>(this)->m_personalbar = new BarInfo(exec, m_part, BarInfo::Personalbar);
+ return m_personalbar;
+}
+
+BarInfo *Window::statusbar(ExecState *exec) const
+{
+ if (!m_statusbar)
+ const_cast<Window*>(this)->m_statusbar = new BarInfo(exec, m_part, BarInfo::Statusbar);
+ return m_statusbar;
+}
+
+BarInfo *Window::toolbar(ExecState *exec) const
+{
+ if (!m_toolbar)
+ const_cast<Window*>(this)->m_toolbar = new BarInfo(exec, m_part, BarInfo::Toolbar);
+ return m_toolbar;
+}
+
+BarInfo *Window::scrollbars(ExecState *exec) const
+{
+ if (!m_scrollbars)
+ const_cast<Window*>(this)->m_scrollbars = new BarInfo(exec, m_part, BarInfo::Scrollbars);
+ return m_scrollbars;
+}
+
// reference our special objects during garbage collection
void Window::mark()
{
loc->mark();
if (m_selection && !m_selection->marked())
m_selection->mark();
+ if (m_locationbar && !m_locationbar->marked())
+ m_locationbar->mark();
+ if (m_menubar && !m_menubar->marked())
+ m_menubar->mark();
+ if (m_personalbar && !m_personalbar->marked())
+ m_personalbar->mark();
+ if (m_scrollbars && !m_scrollbars->marked())
+ m_scrollbars->mark();
+ if (m_statusbar && !m_statusbar->marked())
+ m_statusbar->mark();
+ if (m_toolbar && !m_toolbar->marked())
+ m_toolbar->mark();
}
bool Window::hasProperty(ExecState * /*exec*/, const Identifier &/*p*/) const
case _Konqueror:
return Value(new Konqueror(m_part));
#endif
+ case Locationbar:
+ return Value(locationbar(exec));
+ case Menubar:
+ return Value(menubar(exec));
case OffscreenBuffering:
return Boolean(true);
case Opener:
case Parent:
return Value(retrieve(m_part->parentPart() ? m_part->parentPart() : (KHTMLPart*)m_part));
case Personalbar:
- return Undefined(); // ###
+ return Value(personalbar(exec));
case ScreenLeft:
case ScreenX: {
if (!m_part->view())
return Number(m_part->view()->contentsY());
}
case Scrollbars:
- return Undefined(); // ###
+ return Value(scrollbars(exec));
+ case Statusbar:
+ return Value(statusbar(exec));
+ case Toolbar:
+ return Value(toolbar(exec));
case Self:
case _Window:
return Value(retrieve(m_part));
return Undefined();
}
+////////////////////// BarInfo Object ////////////////////////
+
+const ClassInfo BarInfo::info = { "BarInfo", 0, 0, 0 };
+/*
+@begin BarInfoTable 1
+ visible BarInfo::Visible DontDelete|ReadOnly
+@end
+*/
+BarInfo::BarInfo(ExecState *exec, KHTMLPart *p, Type barType)
+ : ObjectImp(exec->lexicalInterpreter()->builtinObjectPrototype())
+ , m_part(p)
+ , m_type(barType)
+{
+}
+
+BarInfo::~BarInfo()
+{
+}
+
+Value BarInfo::get(ExecState *exec, const Identifier &p) const
+{
+ if (m_part.isNull())
+ return Undefined();
+
+ const HashEntry *entry = Lookup::findEntry(&BarInfoTable, p);
+ if (entry && entry->value == Visible) {
+ switch (m_type) {
+ case Locationbar:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->locationbarVisible());
+#endif
+ case Menubar:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->locationbarVisible());
+#endif
+ case Personalbar:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->personalbarVisible());
+#endif
+ case Scrollbars:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->scrollbarsVisible());
+#endif
+ case Statusbar:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->statusbarVisible());
+#endif
+ case Toolbar:
+#if APPLE_CHANGES
+ return Boolean(KWQ(m_part)->toolbarVisible());
+#endif
+ default:
+ return Boolean(false);
+ }
+ }
+
+ return Undefined();
+}
+
+void BarInfo::put(ExecState *exec, const Identifier &p, const Value &v, int attr)
+{
+}
+
////////////////////// History Object ////////////////////////
const ClassInfo History::info = { "History", 0, 0, 0 };