Newfont Bullet sign

This commit is contained in:
Markus Gans 2015-12-11 06:04:29 +01:00
parent 7207eaa0ff
commit 700c10ef1f
9 changed files with 47 additions and 33 deletions

View File

@ -1,3 +1,7 @@
2015-12-10 Markus Gans <guru.mail@muenster.de>
* PC encoding: Avoid to print ASCII sign 0x00..0x1f in xterm
* Newfont Bullet sign
2015-12-08 Markus Gans <guru.mail@muenster.de> 2015-12-08 Markus Gans <guru.mail@muenster.de>
* Add "menu" example to demonstrate the behavior from FMenuBar, * Add "menu" example to demonstrate the behavior from FMenuBar,
FMenu, FMenuItem, FCheckMenuItem and FRadioMenuItem widgets. FMenu, FMenuItem, FCheckMenuItem and FRadioMenuItem widgets.

View File

@ -10,9 +10,9 @@ Unicode Box Drawing graphics
VT100 line drawing graphics VT100 line drawing graphics
(used by xterm, rxvt, ...) (used by xterm, rxvt, ...)
codes `abcdefghijklmnopqrstuvwxyz{|}~ codes +,-.0_`abcdefghijklmnopqrstuvwxyz{|}~
with G1 )0`abcdefghijklmnopqrstuvwxyz{|}~ with G1 )0+,-.0_`abcdefghijklmnopqrstuvwxyz{|}~
with G0 (0`abcdefghijklmnopqrstuvwxyz{|}~(B with G0 (0+,-.0_`abcdefghijklmnopqrstuvwxyz{|}~(B
VGA graphics, switching to "active codepage" VGA graphics, switching to "active codepage"
(used by cygwin console, Linux console) (used by cygwin console, Linux console)

View File

@ -166,6 +166,7 @@ class fc
NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤ NF_rev_down_pointing_triangle2 = 0x1ae9, // ◤
NF_rev_menu_button3 = 0x1af4, // ] NF_rev_menu_button3 = 0x1af4, // ]
NF_shadow_box_right = 0x1af5, // ] NF_shadow_box_right = 0x1af5, // ]
NF_Bullet = 0x1af9, // ●
NF_check_mark = 0x1afb, // ✓ NF_check_mark = 0x1afb, // ✓
SquareRoot = 0x221a, // √ SquareRoot = 0x221a, // √
BlackCircle = 0x25CF // ● BlackCircle = 0x25CF // ●

View File

@ -642,14 +642,17 @@ void FMenu::drawItems()
{ {
if ( is_radio_btn ) if ( is_radio_btn )
{ {
print (fc::BlackCircle); // BlackCircle ● if ( isNewFont() )
print (fc::NF_Bullet);
else
print (fc::BlackCircle); // BlackCircle ●
} }
else else
{ {
if ( isNewFont() ) if ( isNewFont() )
print (fc::NF_check_mark); print (fc::NF_check_mark);
else else
print (fc::SquareRoot); print (fc::SquareRoot); // SquareRoot √
} }
} }
else else
@ -716,6 +719,7 @@ void FMenu::drawItems()
if ( len > 0 ) if ( len > 0 )
{ {
FString spaces (len, wchar_t(' ')); FString spaces (len, wchar_t(' '));
// BlackRightPointingPointer ►
print (spaces + wchar_t(fc::BlackRightPointingPointer)); print (spaces + wchar_t(fc::BlackRightPointingPointer));
to_char = int(maxItemWidth) - (c + 2); to_char = int(maxItemWidth) - (c + 2);
} }

View File

@ -5748,13 +5748,13 @@ BITMAP
00 00
00 00
00 00
00 38
00 7C
00 FE
18 FE
18 FE
00 7C
00 38
00 00
00 00
00 00

Binary file not shown.

View File

@ -255,7 +255,7 @@ static unsigned char __8x16graph[] =
0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, /* 246 */ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, /* 246 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 247 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 247 */
0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 248 */ 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 248 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 249 */ 0x00, 0x00, 0x00, 0x00, 0x38, 0x7c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, /* 249 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 250 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 250 */
0x00, 0x03, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0xcc, 0xd8, 0xd8, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, /* 251 */ 0x00, 0x03, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0xcc, 0xd8, 0xd8, 0x78, 0x38, 0x00, 0x00, 0x00, 0x00, /* 251 */
0x00, 0xcc, 0x78, 0x30, 0x30, 0x78, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 252 */ 0x00, 0xcc, 0x78, 0x30, 0x30, 0x78, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 252 */

View File

@ -818,6 +818,10 @@ char* FTerm::parseSecDA (char*& current_termtype)
{ {
char* new_termtype = current_termtype; char* new_termtype = current_termtype;
// The Linux console knows no Sec_DA
if ( linux_terminal )
return new_termtype;
// secondary device attributes (SEC_DA) <- decTerminalID string // secondary device attributes (SEC_DA) <- decTerminalID string
Sec_DA = new FString(getSecDA()); Sec_DA = new FString(getSecDA());
@ -1380,6 +1384,13 @@ void FTerm::init()
rxvt_terminal = true; rxvt_terminal = true;
} }
// Test for Linux console
if ( strncmp(termtype, const_cast<char*>("linux"), 5) == 0
|| strncmp(termtype, const_cast<char*>("con"), 3) == 0 )
linux_terminal = true;
else
linux_terminal = false;
// terminal detection... // terminal detection...
setRawMode(); setRawMode();
@ -1399,13 +1410,6 @@ void FTerm::init()
else else
xterm = false; xterm = false;
// Test for Linux console
if ( strncmp(termtype, const_cast<char*>("linux"), 5) == 0
|| strncmp(termtype, const_cast<char*>("con"), 3) == 0 )
linux_terminal = true;
else
linux_terminal = false;
// set the new environment variable TERM // set the new environment variable TERM
if ( new_termtype ) if ( new_termtype )
{ {
@ -3665,6 +3669,7 @@ FString FTerm::getSecDA()
putchar(0x5b); // [ putchar(0x5b); // [
putchar(0x3e); // > putchar(0x3e); // >
putchar(0x63); // c putchar(0x63); // c
fflush(stdout); fflush(stdout);
usleep(150000); // min. wait time 150 ms (need for mintty) usleep(150000); // min. wait time 150 ms (need for mintty)
@ -4252,7 +4257,17 @@ int FTerm::putchar_PC (register int c)
ch = char(c); ch = char(c);
if ( xterm && utf8_console ) if ( xterm && utf8_console )
ret = putchar_UTF8(ch & 0xff); {
if ( uChar(ch) < 0x20 ) // Character 0x00..0x1f
{
Encoding = fc::ASCII;
ch = uChar(charEncode(uInt(c)));
Encoding = fc::PC;
ret = putchar(ch);
}
else
ret = putchar_UTF8(ch & 0xff);
}
else else
ret = putchar(ch); ret = putchar(ch);

View File

@ -210,10 +210,9 @@ MyDialog::MyDialog (FWidget* parent)
Edit->setStatusbarMessage ("Cut-and-paste editing commands"); Edit->setStatusbarMessage ("Cut-and-paste editing commands");
FMenu* View = new FMenu ("&View", Menubar); FMenu* View = new FMenu ("&View", Menubar);
View->setStatusbarMessage ("Show internal informations"); View->setStatusbarMessage ("Show internal informations");
//FMenuItem* Options = new FMenuItem ("&Options", Menubar); FMenuItem* Options = new FMenuItem ("&Options", Menubar);
FMenu* Options = new FMenu ("&Options", Menubar);
Options->setStatusbarMessage ("Set program defaults"); Options->setStatusbarMessage ("Set program defaults");
//Options->setDisable(); Options->setDisable();
FMenuItem* Help = new FMenuItem ("&Help", Menubar); FMenuItem* Help = new FMenuItem ("&Help", Menubar);
Help->setStatusbarMessage ("Show version and copyright information"); Help->setStatusbarMessage ("Show version and copyright information");
@ -257,15 +256,6 @@ MyDialog::MyDialog (FWidget* parent)
FMenuItem* Drive = new FMenuItem ("&Drive symbols...", View); FMenuItem* Drive = new FMenuItem ("&Drive symbols...", View);
Drive->setStatusbarMessage ("Show drive symbols"); Drive->setStatusbarMessage ("Show drive symbols");
// "Options" menu items
FCheckMenuItem* aa = new FCheckMenuItem ("Disk &Status", Options);
aa->setStatusbarMessage ("1");
aa->setChecked();
FRadioMenuItem* bb = new FRadioMenuItem ("&Quick View", Options);
bb->setStatusbarMessage ("2");
FRadioMenuItem* cc = new FRadioMenuItem ("&Baumstrucktur", Options);
cc->setStatusbarMessage ("3");
// Menu function callbacks // Menu function callbacks
Open->addCallback Open->addCallback
( (