📄 widget_buttonround.txt
字号:
00009e d004 BEQ |L3.170|
0000a0 281b CMP r0,#0x1b ;147
0000a2 d11f BNE |L3.228|
|L3.164|
0000a4 2101 MOVS r1,#1 ;149
0000a6 e001 B |L3.172|
|L3.168|
0000a8 e005 B |L3.182|
|L3.170|
0000aa 2100 MOVS r1,#0 ;152
|L3.172|
;;;166 } else {
;;;167 _pcbCallback = WM_SetCallback(hButton, _cbButton);
;;;168 }
;;;169 WM_InvalidateWindow(hButton);
;;;170 }
;;;171 if (Id == GUI_ID_BUTTON2) { /* Toggle font */
;;;172 if (_Font) {
;;;173 BUTTON_SetFont(hButton, &GUI_Font13_1);
;;;174 } else {
;;;175 BUTTON_SetFont(hButton, &GUI_Font8x16);
;;;176 }
;;;177 _Font ^= 1;
;;;178 }
;;;179 if (Id == GUI_ID_BUTTON3) { /* Toggle color */
;;;180 if (_Color) {
;;;181 BUTTON_SetBkColor(hButton, 0, 0xaaaaaa);
;;;182 BUTTON_SetBkColor(hButton, 1, GUI_WHITE);
;;;183 BUTTON_SetTextColor(hButton, 0, GUI_BLACK);
;;;184 BUTTON_SetTextColor(hButton, 1, GUI_BLACK);
;;;185 } else {
;;;186 BUTTON_SetBkColor(hButton, 0, GUI_BLUE);
;;;187 BUTTON_SetBkColor(hButton, 1, GUI_RED);
;;;188 BUTTON_SetTextColor(hButton, 0, GUI_WHITE);
;;;189 BUTTON_SetTextColor(hButton, 1, GUI_YELLOW);
;;;190 }
;;;191 _Color ^= 1;
;;;192 }
;;;193 if (Id == GUI_ID_OK) { /* OK Button */
;;;194 GUI_EndDialog(hDlg, 0);
;;;195 }
;;;196 if (Id == GUI_ID_CANCEL) { /* Cancel Button */
;;;197 GUI_EndDialog(hDlg, 1);
0000ac 4630 MOV r0,r6
0000ae e8bde8bd POP {r4-r8,lr}
0000b2 f7fff7ff B.W GUI_EndDialog
|L3.182|
0000b6 492c LDR r1,|L3.360|
0000b8 4638 MOV r0,r7 ;167
0000ba f7fff7ff BL WM_SetCallback
|L3.190|
0000be 6028 STR r0,[r5,#0] ;169 ; _pcbCallback
0000c0 4638 MOV r0,r7 ;169
0000c2 f7fff7ff BL WM_InvalidateWindow
|L3.198|
0000c6 f5b4f5b4 CMP r4,#0x172 ;171
0000ca d10d BNE |L3.232|
0000cc 68a8 LDR r0,[r5,#8] ;172 ; _Font
0000ce b108 CBZ r0,|L3.212|
0000d0 4926 LDR r1,|L3.364|
0000d2 e000 B |L3.214|
|L3.212|
0000d4 4926 LDR r1,|L3.368|
|L3.214|
0000d6 4638 MOV r0,r7 ;175
0000d8 f7fff7ff BL BUTTON_SetFont
0000dc 68a8 LDR r0,[r5,#8] ;177 ; _Font
0000de f080f080 EOR r0,r0,#1 ;177
0000e2 60a8 STR r0,[r5,#8] ;177 ; _Font
|L3.228|
;;;198 }
;;;199 break;
;;;200 }
;;;201 break;
;;;202 default:
;;;203 WM_DefaultProc(pMsg);
;;;204 }
;;;205 }
0000e4 e8bde8bd POP {r4-r8,pc}
|L3.232|
0000e8 f5a4f5a4 SUB r0,r4,#0x100 ;179
0000ec 3873 SUBS r0,r0,#0x73 ;179
0000ee d12f BNE |L3.336|
0000f0 6868 LDR r0,[r5,#4] ;180 ; _Color
0000f2 f06ff06f MVN r8,#0xff000000 ;180
0000f6 b188 CBZ r0,|L3.284|
0000f8 4a1e LDR r2,|L3.372|
0000fa 2100 MOVS r1,#0 ;181
0000fc 4638 MOV r0,r7 ;181
0000fe f7fff7ff BL BUTTON_SetBkColor
000102 4642 MOV r2,r8 ;182
000104 2101 MOVS r1,#1 ;182
000106 4638 MOV r0,r7 ;182
000108 f7fff7ff BL BUTTON_SetBkColor
00010c 2200 MOVS r2,#0 ;183
00010e 4611 MOV r1,r2 ;183
000110 4638 MOV r0,r7 ;183
000112 f7fff7ff BL BUTTON_SetTextColor
000116 2200 MOVS r2,#0 ;184
000118 e012 B |L3.320|
|L3.282|
00011a e01e B |L3.346|
|L3.284|
00011c f44ff44f MOV r2,#0xff0000 ;186
000120 2100 MOVS r1,#0 ;186
000122 4638 MOV r0,r7 ;186
000124 f7fff7ff BL BUTTON_SetBkColor
000128 22ff MOVS r2,#0xff ;187
00012a 2101 MOVS r1,#1 ;187
00012c 4638 MOV r0,r7 ;187
00012e f7fff7ff BL BUTTON_SetBkColor
000132 4642 MOV r2,r8 ;188
000134 2100 MOVS r1,#0 ;188
000136 4638 MOV r0,r7 ;188
000138 f7fff7ff BL BUTTON_SetTextColor
00013c f64ff64f MOV r2,#0xffff ;189
|L3.320|
000140 2101 MOVS r1,#1 ;189
000142 4638 MOV r0,r7 ;189
000144 f7fff7ff BL BUTTON_SetTextColor
000148 6868 LDR r0,[r5,#4] ;191 ; _Color
00014a f080f080 EOR r0,r0,#1 ;191
00014e 6068 STR r0,[r5,#4] ;191 ; _Color
|L3.336|
000150 2c01 CMP r4,#1 ;193
000152 d0aa BEQ |L3.170|
000154 2c02 CMP r4,#2 ;196
000156 d0a5 BEQ |L3.164|
000158 e7c4 B |L3.228|
|L3.346|
00015a 4628 MOV r0,r5 ;203
00015c e8bde8bd POP {r4-r8,lr} ;203
000160 f7fff7ff B.W WM_DefaultProc
;;;206
ENDP
|L3.356|
000164 00000000 DCD ||.data||
|L3.360|
000168 00000000 DCD _cbButton
|L3.364|
00016c 00000000 DCD GUI_Font13_1
|L3.368|
000170 00000000 DCD GUI_Font8x16
|L3.372|
000174 00aaaaaa DCD 0x00aaaaaa
AREA ||i.MainTask||, CODE, READONLY, ALIGN=2
MainTask PROC
;;;213
;;;214 void MainTask(void) {
000000 b57c PUSH {r2-r6,lr}
;;;215 GUI_Init();
000002 f7fff7ff BL GUI_Init
;;;216 /* Use memory devices for all windows */
;;;217 WM_SetCreateFlags(WM_CF_MEMDEV);
000006 2004 MOVS r0,#4
000008 f7fff7ff BL WM_SetCreateFlags
;;;218 WM_EnableMemdev(WM_HBKWIN);
00000c f7fff7ff BL WM_GetDesktopWindow
000010 f7fff7ff BL WM_EnableMemdev
;;;219 WM_SetDesktopColor(GUI_GREEN);
000014 f44ff44f MOV r0,#0xff00
000018 f7fff7ff BL WM_SetDesktopColor
00001c 4d09 LDR r5,|L4.68|
00001e 2400 MOVS r4,#0
000020 f44ff44f MOV r6,#0x3e8
|L4.36|
;;;220 while(1) {
;;;221 _Font = 0;
;;;222 _Color = 0;
000024 60ac STR r4,[r5,#8] ; _Font
;;;223 _pcbCallback = 0;
000026 606c STR r4,[r5,#4] ; _Color
;;;224 GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, 0, 0, 0);
000028 2300 MOVS r3,#0
00002a 602c STR r4,[r5,#0] ; _pcbCallback
00002c 9300 STR r3,[sp,#0]
00002e 4a06 LDR r2,|L4.72|
000030 2106 MOVS r1,#6
000032 4806 LDR r0,|L4.76|
000034 9301 STR r3,[sp,#4]
000036 f7fff7ff BL GUI_ExecDialogBox
;;;225 GUI_Delay(1000);
00003a 4630 MOV r0,r6
00003c f7fff7ff BL GUI_Delay
000040 e7f0 B |L4.36|
;;;226 }
;;;227 }
ENDP
000042 0000 DCW 0x0000
|L4.68|
000044 00000000 DCD ||.data||
|L4.72|
000048 00000000 DCD _cbDialog
|L4.76|
00004c 00000000 DCD ||.constdata||
AREA ||.data||, DATA, ALIGN=2
_pcbCallback
000000 00000000 DCD 0x00000000
_Color
000004 00000000 DCD 0x00000000
_Font
000008 00000000 DCD 0x00000000
_Pressed
00000c 00000000 DCD 0x00000000
AREA ||.constdata||, DATA, READONLY, ALIGN=2
_aDialogCreate
000000 00000000 DCD FRAMEWIN_CreateIndirect
000004 00000000 DCD ||.conststring||
000008 00000032 DCW 0x0000,0x0032
00000c 003c00c8 DCW 0x003c,0x00c8
000010 00780010 DCW 0x0078,0x0010
000014 00000000 DCD 0x00000000
000018 00000000 DCD BUTTON_CreateIndirect
00001c 00000014 DCD ||.conststring||+0x14
000020 01700064 DCW 0x0170,0x0064
000024 000a0050 DCW 0x000a,0x0050
000028 00500000 DCW 0x0050,0x0000
00002c 00000000 DCD 0x00000000
000030 00000000 DCD BUTTON_CreateIndirect
000034 0000001b DCD ||.conststring||+0x1b
000038 0171000a DCW 0x0171,0x000a
00003c 000a003c DCW 0x000a,0x003c
000040 00140000 DCW 0x0014,0x0000
000044 00000000 DCD 0x00000000
000048 00000000 DCD BUTTON_CreateIndirect
00004c 00000024 DCD ||.conststring||+0x24
000050 0172000a DCW 0x0172,0x000a
000054 001e003c DCW 0x001e,0x003c
000058 00140000 DCW 0x0014,0x0000
00005c 00000000 DCD 0x00000000
000060 00000000 DCD BUTTON_CreateIndirect
000064 00000029 DCD ||.conststring||+0x29
000068 0173000a DCW 0x0173,0x000a
00006c 0032003c DCW 0x0032,0x003c
000070 00140000 DCW 0x0014,0x0000
000074 00000000 DCD 0x00000000
000078 00000000 DCD BUTTON_CreateIndirect
00007c 0000002f DCD ||.conststring||+0x2f
000080 0002000a DCW 0x0002,0x000a
000084 0046003c DCW 0x0046,0x003c
000088 00140000 DCW 0x0014,0x0000
00008c 00000000 DCD 0x00000000
AREA ||.conststring||, DATA, READONLY, MERGE=1, STRINGS, ALIGN=0
000000 526f756e DCB "Roun"
000004 64206275 DCB "d bu"
000008 74746f6e DCB "tton"
00000c 2073616d DCB " sam"
000010 706c6500 DCB "ple\0"
000014 42757474 DCB "Butt"
000018 6f6e0043 DCB "on\0\103"
00001c 616c6c62 DCB "allb"
000020 61636b00 DCB "ack\0"
000024 466f6e74 DCB "Font"
000028 00436f6c DCB "\0\103\157\154"
00002c 6f720043 DCB "or\0\103"
000030 616e6365 DCB "ance"
000034 6c00 DCB "l\0"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -