⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listbox_deleteitem.txt

📁 STM32F103ZET6+UCOSII+UCGUI源码
💻 TXT
字号:
; generated by ARM C/C++ Compiler with , RVCT4.0 [Build 524] for uVision
; commandline ArmCC [--split_sections --debug -c --asm --interleave -o.\Obj\listbox_deleteitem.o --depend=.\Obj\listbox_deleteitem.d --device=DARMSTM --apcs=interwork -O3 -I..\..\include -I..\..\..\FWLib\library\inc -I..\..\..\USBLib\library\inc -I..\..\Config -I..\..\GUI\Core -I..\..\GUI\Font -I..\..\GUI\ConvertColor -I..\..\GUI\AntiAlias -I..\..\GUI\ConvertMono -I..\..\GUI\JPEG -I..\..\GUI\MemDev -I..\..\GUI\MultiLayer -I..\..\GUI\Widget -I..\..\GUI\WM -IC:\Keil\ARM\INC\ST\STM32F10x ..\..\GUI\Widget\LISTBOX_DeleteItem.c]
                          THUMB

                          AREA ||i.LISTBOX_DeleteItem||, CODE, READONLY, ALIGN=1

                  LISTBOX_DeleteItem PROC
;;;36     */
;;;37     void LISTBOX_DeleteItem(LISTBOX_Handle hObj, unsigned int Index) {
000000  b570              PUSH     {r4-r6,lr}
000002  0006              MOVS     r6,r0
000004  460d              MOV      r5,r1
;;;38       if (hObj) {
000006  d02a              BEQ      |L1.94|
;;;39         int Sel;
;;;40         LISTBOX_Obj* pObj;
;;;41         unsigned int NumItems;
;;;42         WM_LOCK();
;;;43         pObj = LISTBOX_H2P(hObj);
000008  4630              MOV      r0,r6
00000a  f7fffffe          BL       GUI_ALLOC_h2p
00000e  4604              MOV      r4,r0
;;;44         NumItems = LISTBOX__GetNumItems(pObj);
000010  f7fffffe          BL       LISTBOX__GetNumItems
;;;45         if (Index < NumItems) {
000014  4285              CMP      r5,r0
000016  d222              BCS      |L1.94|
;;;46           GUI_ARRAY_DeleteItem(&pObj->ItemArray, Index);
000018  4629              MOV      r1,r5
00001a  f1040028          ADD      r0,r4,#0x28
00001e  f7fffffe          BL       GUI_ARRAY_DeleteItem
;;;47           /*
;;;48            * Update selection
;;;49            */
;;;50           Sel = pObj->Sel;
000022  f9b40072          LDRSH    r0,[r4,#0x72]
;;;51           if (Sel >= 0) {                     /* Valid selction ? */
000026  2800              CMP      r0,#0
000028  db09              BLT      |L1.62|
;;;52             if ((int)Index == Sel) {          /* Deleting selected item ? */
00002a  4285              CMP      r5,r0
00002c  d102              BNE      |L1.52|
;;;53               pObj->Sel = -1;                 /* Invalidate selection */
00002e  f04f30ff          MOV      r0,#0xffffffff
000032  e002              B        |L1.58|
                  |L1.52|
;;;54             } else if ((int)Index < Sel) {    /* Deleting item above selection ? */
000034  da03              BGE      |L1.62|
;;;55               pObj->Sel--;
000036  f1a00001          SUB      r0,r0,#1
                  |L1.58|
00003a  f8a40072          STRH     r0,[r4,#0x72]
                  |L1.62|
;;;56             }
;;;57           }
;;;58           if (LISTBOX_UpdateScrollers(hObj)) {
00003e  4630              MOV      r0,r6
000040  f7fffffe          BL       LISTBOX_UpdateScrollers
000044  b120              CBZ      r0,|L1.80|
;;;59             LISTBOX__InvalidateInsideArea(hObj);
000046  4630              MOV      r0,r6
000048  e8bd4070          POP      {r4-r6,lr}
00004c  f7ffbffe          B.W      LISTBOX__InvalidateInsideArea
                  |L1.80|
;;;60           } else {
;;;61             LISTBOX__InvalidateItemAndBelow(hObj, pObj, Index);
000050  462a              MOV      r2,r5
000052  4621              MOV      r1,r4
000054  4630              MOV      r0,r6
000056  e8bd4070          POP      {r4-r6,lr}
00005a  f7ffbffe          B.W      LISTBOX__InvalidateItemAndBelow
                  |L1.94|
;;;62           }
;;;63         }
;;;64         WM_UNLOCK();
;;;65       }
;;;66     }
00005e  bd70              POP      {r4-r6,pc}
;;;67     
                          ENDP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -