mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-26 06:12:49 -06:00
ExtractAccessKey now stores position
git-svn-id: svn://ultimatepp.org/upp/trunk@997 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
36555d3712
commit
ae292b5cf4
12 changed files with 219 additions and 208 deletions
|
|
@ -263,12 +263,12 @@ typedef uint64 qword;
|
|||
#define HIWORD(a) (word)((a) >> 16)
|
||||
#define LOWORD(a) word(a)
|
||||
|
||||
#define MAKEWORD(a, b) ((word) (((byte) (a)) | ((word) ((byte) (b))) << 8))
|
||||
#define MAKELONG(a, b) ((dword) (((word) (a)) | ((dword) ((word) (b))) << 16))
|
||||
#define MAKEWORD(l, h) ((word) (((byte) (l)) | ((word) ((byte) (h))) << 8))
|
||||
#define MAKELONG(l, h) ((dword) (((word) (l)) | ((dword) ((word) (h))) << 16))
|
||||
|
||||
#endif
|
||||
|
||||
#define MAKEQWORD(a, b) ((qword) (((dword) (a)) | ((qword) ((dword) (b))) << 32))
|
||||
#define MAKEQWORD(l, h) ((qword) (((dword) (l)) | ((qword) ((dword) (h))) << 32))
|
||||
#define HIDWORD(a) (dword)(((uint64)a) >> 32)
|
||||
#define LODWORD(a) dword(a)
|
||||
|
||||
|
|
|
|||
|
|
@ -124,8 +124,9 @@ bool Ctrl::Key(dword key, int count)
|
|||
void Ctrl::GotFocus() {}
|
||||
void Ctrl::LostFocus() {}
|
||||
|
||||
dword Ctrl::AccessKeyBit(byte accesskey)
|
||||
dword Ctrl::AccessKeyBit(int accesskey)
|
||||
{
|
||||
accesskey &= 255;
|
||||
if(accesskey >= 'A' && accesskey <= 'Z')
|
||||
return (uint64)2 << (accesskey - 'A');
|
||||
return !!accesskey;
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,7 @@ public:
|
|||
static bool IterateFocusForward(Ctrl *ctrl, Ctrl *top, bool noframe = false, bool init = false, bool all = false);
|
||||
static bool IterateFocusBackward(Ctrl *ctrl, Ctrl *top, bool noframe = false, bool all = false);
|
||||
|
||||
static dword AccessKeyBit(byte accesskey);
|
||||
static dword AccessKeyBit(int accesskey);
|
||||
dword GetAccessKeysDeep() const;
|
||||
void DistributeAccessKeys();
|
||||
bool VisibleAccessKeys();
|
||||
|
|
|
|||
|
|
@ -105,26 +105,29 @@ void DrawSmartText(Draw& draw, int x, int y, int cx, const char *text, Font font
|
|||
DrawTLText(draw, x, y, cx, ToUnicode(text, CHARSET_DEFAULT), font, ink, accesskey);
|
||||
}
|
||||
|
||||
bool CompareAccessKey(byte accesskey, dword key)
|
||||
bool CompareAccessKey(int accesskey, dword key)
|
||||
{
|
||||
return accesskey && dword(ToUpper(accesskey) - 'A' + K_ALT_A) == key;
|
||||
return accesskey && dword(ToUpper(accesskey & 255) - 'A' + K_ALT_A) == key;
|
||||
}
|
||||
|
||||
byte ExtractAccessKey(const char *s, String& label)
|
||||
int ExtractAccessKey(const char *s, String& label)
|
||||
{
|
||||
byte accesskey = 0;
|
||||
byte akey = 0;
|
||||
int pos = 0;
|
||||
String text;
|
||||
const char* start = s;
|
||||
bool qtf = *s == '\1';
|
||||
while(*s)
|
||||
if((*s == '&' && !qtf || *s == '\b') && s[1] && s[1] != '&') {
|
||||
accesskey = ToAscii(ToUpper(s[1]));
|
||||
akey = ToAscii(ToUpper(s[1]));
|
||||
pos = s - start + 1;
|
||||
s++;
|
||||
}
|
||||
else
|
||||
text.Cat(*s++);
|
||||
text.Shrink();
|
||||
label = text;
|
||||
return accesskey;
|
||||
return MAKELONG(akey, pos);
|
||||
}
|
||||
|
||||
byte ChooseAccessKey(const char *text, dword used)
|
||||
|
|
@ -154,6 +157,7 @@ DrawLabel::DrawLabel()
|
|||
ink = Null;
|
||||
align = valign = ALIGN_CENTER;
|
||||
accesskey = 0;
|
||||
accesspos = -1;
|
||||
}
|
||||
|
||||
Size DrawLabel::GetSize(int txtcx) const
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ int GetSmartTextHeight(const char *s, int cx, Font font = StdFont());
|
|||
void DrawSmartText(Draw& w, int x, int y, int cx, const char *text,
|
||||
Font font = StdFont(), Color ink = DefaultInk, int accesskey = 0);
|
||||
|
||||
byte ExtractAccessKey(const char *s, String& label);
|
||||
bool CompareAccessKey(byte accesskey, dword key);
|
||||
int ExtractAccessKey(const char *s, String& label);
|
||||
bool CompareAccessKey(int accesskey, dword key);
|
||||
byte ChooseAccessKey(const char *s, dword used);
|
||||
|
||||
void DrawFocus(Draw& w, int x, int y, int cx, int cy, Color c = SColorText());
|
||||
|
|
@ -55,6 +55,7 @@ struct DrawLabel {
|
|||
int align, valign;
|
||||
|
||||
int accesskey;
|
||||
int accesspos;
|
||||
|
||||
Size GetSize(int txtcx, Size sz1, int lspc, Size sz2, int rspc) const;
|
||||
Size GetSize(int txtcx = INT_MAX) const;
|
||||
|
|
|
|||
|
|
@ -1,183 +1,183 @@
|
|||
#include "CtrlLib.h"
|
||||
|
||||
#ifndef CtrlCore_MenuImp_h
|
||||
#define CtrlCore_MenuImp_h
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class MenuItemBase : public Ctrl, public Bar::Item
|
||||
{
|
||||
public:
|
||||
virtual Bar::Item& Text(const char *text);
|
||||
virtual Bar::Item& Key(dword key);
|
||||
virtual Bar::Item& Image(const UPP::Image& img);
|
||||
virtual Bar::Item& Enable(bool _enable);
|
||||
virtual Bar::Item& Tip(const char *tip);
|
||||
virtual Bar::Item& Help(const char *help);
|
||||
virtual Bar::Item& Topic(const char *help);
|
||||
virtual Bar::Item& Description(const char *desc);
|
||||
virtual Bar::Item& Check(bool check);
|
||||
virtual Bar::Item& Radio(bool check);
|
||||
|
||||
virtual String GetDesc() const;
|
||||
virtual dword GetAccessKeys() const;
|
||||
virtual void AssignAccessKeys(dword used);
|
||||
|
||||
protected:
|
||||
enum {
|
||||
NOTHING, CHECK0, CHECK1, RADIO0, RADIO1
|
||||
};
|
||||
|
||||
enum {
|
||||
NORMAL, HIGHLIGHT, PUSH
|
||||
};
|
||||
|
||||
String text;
|
||||
dword accel;
|
||||
int state;
|
||||
int leftgap, textgap;
|
||||
Font font;
|
||||
bool isenabled;
|
||||
byte type;
|
||||
byte accesskey;
|
||||
Size maxiconsize;
|
||||
const MenuBar::Style *style;
|
||||
|
||||
public:
|
||||
virtual void SyncState() = 0;
|
||||
|
||||
void DrawMenuText(Draw& w, int x, int y, const String& s, Font f, bool enabled, bool hl,
|
||||
Color color, Color hlcolor);
|
||||
void PaintTopItem(Draw& w, int state);
|
||||
|
||||
bool IsItemEnabled() const { return isenabled; }
|
||||
String GetText() const { return text; }
|
||||
MenuItemBase& LeftGap(int cx) { leftgap = cx; return *this; }
|
||||
MenuItemBase& TextGap(int cx) { textgap = cx; return *this; }
|
||||
MenuItemBase& SetFont(Font f) { font = f; return *this; }
|
||||
MenuItemBase& Style(const MenuBar::Style *s) { style = s; return *this; }
|
||||
Font GetFont() const { return font; }
|
||||
MenuItemBase& MaxIconSize(Size sz) { maxiconsize = sz; return *this; }
|
||||
|
||||
MenuItemBase();
|
||||
};
|
||||
|
||||
void DrawMenuText(Draw& w, int x, int y, const String& s, Font f, bool enabled,
|
||||
bool highlight, int mn, Color color, Color hltext);
|
||||
|
||||
class MenuItem : public MenuItemBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual Size GetMinSize() const;
|
||||
virtual void LeftUp(Point, dword);
|
||||
virtual void RightUp(Point, dword);
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual bool HotKey(dword key);
|
||||
virtual void SyncState();
|
||||
|
||||
virtual Bar::Item& Image(const UPP::Image& img);
|
||||
|
||||
private:
|
||||
UPP::Image licon, ricon;
|
||||
|
||||
void SendHelpLine();
|
||||
void ClearHelpLine();
|
||||
|
||||
protected:
|
||||
virtual int GetVisualState();
|
||||
|
||||
public:
|
||||
MenuItem& RightImage(const UPP::Image& img);
|
||||
};
|
||||
|
||||
class SubMenuBase {
|
||||
protected:
|
||||
MenuBar menu;
|
||||
Callback1<Bar&> proc;
|
||||
MenuBar *parentmenu;
|
||||
|
||||
void Pull(Ctrl *item, Point p, Size sz);
|
||||
|
||||
public:
|
||||
virtual void Pull() = 0;
|
||||
|
||||
void SetParent(MenuBar *m) { parentmenu = m; menu.MaxIconSize(m->GetMaxIconSize()); }
|
||||
void Set(Callback1<Bar&> _submenu) { proc = _submenu; }
|
||||
Callback1<Bar&> Get() { return proc; }
|
||||
|
||||
SubMenuBase() { parentmenu = NULL; }
|
||||
virtual ~SubMenuBase() {}
|
||||
};
|
||||
|
||||
class SubMenuItem : public MenuItem, public SubMenuBase {
|
||||
public:
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void GotFocus();
|
||||
virtual bool HotKey(dword key);
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual int GetVisualState();
|
||||
virtual void Pull();
|
||||
|
||||
protected:
|
||||
enum {
|
||||
TIMEID_PULL = BarCtrl::TIMEID_COUNT,
|
||||
TIMEID_COUNT
|
||||
};
|
||||
|
||||
public:
|
||||
typedef SubMenuItem CLASSNAME;
|
||||
|
||||
SubMenuItem();
|
||||
};
|
||||
|
||||
class TopSubMenuItem : public MenuItemBase, public SubMenuBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual void LeftDown(Point, dword);
|
||||
virtual void SyncState();
|
||||
virtual Size GetMinSize() const;
|
||||
virtual bool Key(dword key, int);
|
||||
virtual bool HotKey(dword key);
|
||||
virtual void Pull();
|
||||
|
||||
private:
|
||||
int GetState();
|
||||
|
||||
public:
|
||||
TopSubMenuItem() { NoInitFocus(); }
|
||||
};
|
||||
|
||||
class TopMenuItem : public MenuItemBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void LeftUp(Point, dword);
|
||||
virtual void LeftDown(Point, dword);
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual Size GetMinSize() const;
|
||||
virtual void SyncState();
|
||||
|
||||
static int GetStdHeight(Font font = StdFont());
|
||||
|
||||
private:
|
||||
int GetState();
|
||||
|
||||
public:
|
||||
TopMenuItem() { NoInitFocus(); }
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
#include "CtrlLib.h"
|
||||
|
||||
#ifndef CtrlCore_MenuImp_h
|
||||
#define CtrlCore_MenuImp_h
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
class MenuItemBase : public Ctrl, public Bar::Item
|
||||
{
|
||||
public:
|
||||
virtual Bar::Item& Text(const char *text);
|
||||
virtual Bar::Item& Key(dword key);
|
||||
virtual Bar::Item& Image(const UPP::Image& img);
|
||||
virtual Bar::Item& Enable(bool _enable);
|
||||
virtual Bar::Item& Tip(const char *tip);
|
||||
virtual Bar::Item& Help(const char *help);
|
||||
virtual Bar::Item& Topic(const char *help);
|
||||
virtual Bar::Item& Description(const char *desc);
|
||||
virtual Bar::Item& Check(bool check);
|
||||
virtual Bar::Item& Radio(bool check);
|
||||
|
||||
virtual String GetDesc() const;
|
||||
virtual dword GetAccessKeys() const;
|
||||
virtual void AssignAccessKeys(dword used);
|
||||
|
||||
protected:
|
||||
enum {
|
||||
NOTHING, CHECK0, CHECK1, RADIO0, RADIO1
|
||||
};
|
||||
|
||||
enum {
|
||||
NORMAL, HIGHLIGHT, PUSH
|
||||
};
|
||||
|
||||
String text;
|
||||
dword accel;
|
||||
int state;
|
||||
int leftgap, textgap;
|
||||
Font font;
|
||||
bool isenabled;
|
||||
byte type;
|
||||
int accesskey;
|
||||
Size maxiconsize;
|
||||
const MenuBar::Style *style;
|
||||
|
||||
public:
|
||||
virtual void SyncState() = 0;
|
||||
|
||||
void DrawMenuText(Draw& w, int x, int y, const String& s, Font f, bool enabled, bool hl,
|
||||
Color color, Color hlcolor);
|
||||
void PaintTopItem(Draw& w, int state);
|
||||
|
||||
bool IsItemEnabled() const { return isenabled; }
|
||||
String GetText() const { return text; }
|
||||
MenuItemBase& LeftGap(int cx) { leftgap = cx; return *this; }
|
||||
MenuItemBase& TextGap(int cx) { textgap = cx; return *this; }
|
||||
MenuItemBase& SetFont(Font f) { font = f; return *this; }
|
||||
MenuItemBase& Style(const MenuBar::Style *s) { style = s; return *this; }
|
||||
Font GetFont() const { return font; }
|
||||
MenuItemBase& MaxIconSize(Size sz) { maxiconsize = sz; return *this; }
|
||||
|
||||
MenuItemBase();
|
||||
};
|
||||
|
||||
void DrawMenuText(Draw& w, int x, int y, const String& s, Font f, bool enabled,
|
||||
bool highlight, int mn, Color color, Color hltext);
|
||||
|
||||
class MenuItem : public MenuItemBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual Size GetMinSize() const;
|
||||
virtual void LeftUp(Point, dword);
|
||||
virtual void RightUp(Point, dword);
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual bool HotKey(dword key);
|
||||
virtual void SyncState();
|
||||
|
||||
virtual Bar::Item& Image(const UPP::Image& img);
|
||||
|
||||
private:
|
||||
UPP::Image licon, ricon;
|
||||
|
||||
void SendHelpLine();
|
||||
void ClearHelpLine();
|
||||
|
||||
protected:
|
||||
virtual int GetVisualState();
|
||||
|
||||
public:
|
||||
MenuItem& RightImage(const UPP::Image& img);
|
||||
};
|
||||
|
||||
class SubMenuBase {
|
||||
protected:
|
||||
MenuBar menu;
|
||||
Callback1<Bar&> proc;
|
||||
MenuBar *parentmenu;
|
||||
|
||||
void Pull(Ctrl *item, Point p, Size sz);
|
||||
|
||||
public:
|
||||
virtual void Pull() = 0;
|
||||
|
||||
void SetParent(MenuBar *m) { parentmenu = m; menu.MaxIconSize(m->GetMaxIconSize()); }
|
||||
void Set(Callback1<Bar&> _submenu) { proc = _submenu; }
|
||||
Callback1<Bar&> Get() { return proc; }
|
||||
|
||||
SubMenuBase() { parentmenu = NULL; }
|
||||
virtual ~SubMenuBase() {}
|
||||
};
|
||||
|
||||
class SubMenuItem : public MenuItem, public SubMenuBase {
|
||||
public:
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void GotFocus();
|
||||
virtual bool HotKey(dword key);
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual int GetVisualState();
|
||||
virtual void Pull();
|
||||
|
||||
protected:
|
||||
enum {
|
||||
TIMEID_PULL = BarCtrl::TIMEID_COUNT,
|
||||
TIMEID_COUNT
|
||||
};
|
||||
|
||||
public:
|
||||
typedef SubMenuItem CLASSNAME;
|
||||
|
||||
SubMenuItem();
|
||||
};
|
||||
|
||||
class TopSubMenuItem : public MenuItemBase, public SubMenuBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual void LeftDown(Point, dword);
|
||||
virtual void SyncState();
|
||||
virtual Size GetMinSize() const;
|
||||
virtual bool Key(dword key, int);
|
||||
virtual bool HotKey(dword key);
|
||||
virtual void Pull();
|
||||
|
||||
private:
|
||||
int GetState();
|
||||
|
||||
public:
|
||||
TopSubMenuItem() { NoInitFocus(); }
|
||||
};
|
||||
|
||||
class TopMenuItem : public MenuItemBase {
|
||||
public:
|
||||
virtual void Paint(Draw& w);
|
||||
virtual void MouseEnter(Point, dword);
|
||||
virtual void MouseLeave();
|
||||
virtual void LeftUp(Point, dword);
|
||||
virtual void LeftDown(Point, dword);
|
||||
virtual void GotFocus();
|
||||
virtual void LostFocus();
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual Size GetMinSize() const;
|
||||
virtual void SyncState();
|
||||
|
||||
static int GetStdHeight(Font font = StdFont());
|
||||
|
||||
private:
|
||||
int GetState();
|
||||
|
||||
public:
|
||||
TopMenuItem() { NoInitFocus(); }
|
||||
};
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ private:
|
|||
void EndPush();
|
||||
|
||||
protected:
|
||||
byte accesskey;
|
||||
int accesskey;
|
||||
String label;
|
||||
Font font;
|
||||
|
||||
|
|
@ -222,9 +222,9 @@ private:
|
|||
Image image1;
|
||||
String label;
|
||||
const Style *style;
|
||||
int accesskey;
|
||||
bool option;
|
||||
bool push;
|
||||
byte accesskey;
|
||||
|
||||
public:
|
||||
ButtonOption& SetImage(const Image& img) { image = img; Refresh(); return *this; }
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ Label& Label::SetText(const char *text)
|
|||
Label& Label::SetLabel(const char *_text)
|
||||
{
|
||||
String text;
|
||||
byte accesskey = ExtractAccessKey(_text, text);
|
||||
int accesskey = ExtractAccessKey(_text, text);
|
||||
LabelBase::SetText(text);
|
||||
lbl.accesskey = accesskey;
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -85,10 +85,13 @@ void DrawTLText(Draw& draw, int x, int y, int cx, const wchar *text,
|
|||
int cy = font.Info().GetHeight();
|
||||
const wchar *s = text;
|
||||
const wchar *t = s;
|
||||
int apos = HIWORD(accesskey);
|
||||
int akey = LOWORD(accesskey);
|
||||
for(;;) {
|
||||
if(*s == '\n' || *s == '\0') {
|
||||
int a = x;
|
||||
const wchar *q = t;
|
||||
const wchar *start = NULL;
|
||||
while(q < s) {
|
||||
while(q < s && *q < ' ') {
|
||||
if(*q == '\t')
|
||||
|
|
@ -97,14 +100,16 @@ void DrawTLText(Draw& draw, int x, int y, int cx, const wchar *text,
|
|||
}
|
||||
t = q;
|
||||
bool ak = false;
|
||||
start = q;
|
||||
while(q < s && *q >= ' ') {
|
||||
if(accesskey && ToUpper(ToAscii(*q)) == accesskey) {
|
||||
if(akey && ToUpper(ToAscii(*q)) == akey && (apos == 0 || q - start + 1 == apos)) {
|
||||
ak = true;
|
||||
accesskey = 0;
|
||||
akey = 0;
|
||||
break;
|
||||
}
|
||||
q++;
|
||||
}
|
||||
start = NULL;
|
||||
draw.DrawText(a, y, t, font, ink, (int)(q - t));
|
||||
a += GetTextSize(t, font, (int)(q - t)).cx;
|
||||
if(ak) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class RichQtfParser {
|
|||
RichTable tablepart;
|
||||
bool istable;
|
||||
bool breakpage;
|
||||
byte accesskey;
|
||||
int accesskey;
|
||||
|
||||
struct PFormat : public RichPara::Format {
|
||||
byte charset;
|
||||
|
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
RichText target;
|
||||
|
||||
void Parse(const char *qtf, byte accesskey);
|
||||
void Parse(const char *qtf, int accesskey);
|
||||
|
||||
RichQtfParser();
|
||||
};
|
||||
|
|
@ -476,7 +476,7 @@ void RichQtfParser::FinishOldTable()
|
|||
|
||||
void RichQtfParser::Cat(int chr)
|
||||
{
|
||||
if(accesskey && ToUpper(ToAscii(chr)) == accesskey) {
|
||||
if(accesskey && ToUpper(ToAscii(chr)) == LOBYTE(accesskey)) {
|
||||
Flush();
|
||||
format.Underline(!format.IsUnderline());
|
||||
text.Cat(chr);
|
||||
|
|
@ -491,7 +491,7 @@ void RichQtfParser::Cat(int chr)
|
|||
|
||||
extern bool s_nodeqtf[128];
|
||||
|
||||
void RichQtfParser::Parse(const char *qtf, byte _accesskey)
|
||||
void RichQtfParser::Parse(const char *qtf, int _accesskey)
|
||||
{
|
||||
accesskey = _accesskey;
|
||||
term = qtf;
|
||||
|
|
@ -925,7 +925,7 @@ void RichQtfParser::Parse(const char *qtf, byte _accesskey)
|
|||
FlushStyles();
|
||||
}
|
||||
|
||||
RichText ParseQTF(const char *qtf, byte accesskey)
|
||||
RichText ParseQTF(const char *qtf, int accesskey)
|
||||
{
|
||||
RichQtfParser p;
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ public:
|
|||
|
||||
String AsQTF(const RichObject& obj);
|
||||
|
||||
RichText ParseQTF(const char *qtf, byte accesskey = 0);
|
||||
RichText ParseQTF(const char *qtf, int accesskey = 0);
|
||||
|
||||
RichText AsRichText(const wchar *s, const RichPara::Format& f = RichPara::Format());
|
||||
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ void EscDraw::DrawSmartText(EscEscape& e)
|
|||
String text;
|
||||
if(ii < e.GetCount() && e[ii].IsArray())
|
||||
text = ToUtf8((WString)e[ii++]);
|
||||
byte accesskey = ExtractAccessKey(text, text);
|
||||
int accesskey = ExtractAccessKey(text, text);
|
||||
Font font = StdFont().Height(11);
|
||||
if(ii < e.GetCount())
|
||||
font = FontEsc(e[ii++]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue