diff options
Diffstat (limited to 'src/modules/lexdict/swld.cpp')
-rw-r--r-- | src/modules/lexdict/swld.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/modules/lexdict/swld.cpp b/src/modules/lexdict/swld.cpp index 97adc36..f8421cc 100644 --- a/src/modules/lexdict/swld.cpp +++ b/src/modules/lexdict/swld.cpp @@ -5,6 +5,7 @@ #include <swld.h> +SWORD_NAMESPACE_START /****************************************************************************** * SWLD Constructor - Initializes data for instance of SWLD @@ -47,9 +48,31 @@ SWLD::~SWLD() const char *SWLD::KeyText(const char *ikeytext) { if (key->Persist() && !ikeytext) { - getRawEntry(); // force module key to snap to entry + getRawEntryBuf(); // force module key to snap to entry return entkeytxt; } else return SWModule::KeyText(ikeytext); } + +/****************************************************************************** + * SWLD::setPosition(SW_POSITION) - Positions this key if applicable + */ + +void SWLD::setPosition(SW_POSITION p) { + if (!key->Traversable()) { + switch (p) { + case POS_TOP: + *key = ""; + break; + case POS_BOTTOM: + *key = "zzzzzzzzz"; + break; + } + } + else *key = p; + getRawEntryBuf(); +} + + +SWORD_NAMESPACE_END |