#include #include #include #include #include #include "qframe_imp.h" /** * Namespace containing the KJSEmbed library. */ namespace KJSEmbed { void TQFrameImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) { // // Define the enum constants // struct EnumValue { const char *id; int val; }; EnumValue enums[] = { // enum Shape { "NoFrame", TTQFrame::NoFrame }, { "Box", TTQFrame::Box }, { "Panel", TTQFrame::Panel }, { "WinPanel", TTQFrame::WinPanel }, { "HLine", TTQFrame::HLine }, { "VLine", TTQFrame::VLine }, { "StyledPanel", TTQFrame::StyledPanel }, { "PopupPanel", TTQFrame::PopupPanel }, { "MenuBarPanel", TTQFrame::MenuBarPanel }, { "ToolBarPanel", TTQFrame::ToolBarPanel }, { "LineEditPanel", TTQFrame::LineEditPanel }, { "TabWidgetPanel", TTQFrame::TabWidgetPanel }, { "GroupBoxPanel", TTQFrame::GroupBoxPanel }, { "MShape", TTQFrame::MShape }, // enum Shadow { "Plain", TTQFrame::Plain }, { "Raised", TTQFrame::Raised }, { "Sunken", TTQFrame::Sunken }, { "MShadow", TTQFrame::MShadow }, { 0, 0 } }; int enumidx = 0; do { object.put( exec, enums[enumidx].id, KJS::Number(enums[enumidx].val), KJS::ReadOnly ); ++enumidx; } while( enums[enumidx].id ); } } // namespace KJSEmbed // Local Variables: // c-basic-offset: 4 // End: