|
@@ -675,19 +675,19 @@ int la_IsThisSysWindow(laWindow *wnd, Window hwnd){
|
|
|
};
|
|
|
void la_EnsurePanelSnapping(laPanel *p, int CW, int CH){
|
|
|
if (p->SL){ int s=p->SL<0?0:p->SL;
|
|
|
- if (p->TX != s) p->Refresh |= LA_TAG_RECALC;
|
|
|
+ if (p->TX != s) laRecalcPanel(p);
|
|
|
p->TX = s;
|
|
|
}
|
|
|
if (p->SR){ int s=p->SR<0?0:p->SR;
|
|
|
- if (p->TW != CW - p->TX - s) p->Refresh |= LA_TAG_RECALC;
|
|
|
+ if (p->TW != CW - p->TX - s) laRecalcPanel(p);
|
|
|
p->TW = CW - p->TX - s;
|
|
|
}
|
|
|
if (p->ST){ int s=p->ST<0?0:p->ST;
|
|
|
- if (p->TY != s) p->Refresh |= LA_TAG_RECALC;
|
|
|
+ if (p->TY != s) laRecalcPanel(p);
|
|
|
p->TY = s;
|
|
|
}
|
|
|
if (p->SB){ int s=p->SB<0?0:p->SB;
|
|
|
- if (p->TH != CH - p->TY - s) p->Refresh |= LA_TAG_RECALC;
|
|
|
+ if (p->TH != CH - p->TY - s) laRecalcPanel(p);
|
|
|
p->TH = CH - p->TY - s;
|
|
|
}
|
|
|
}
|
|
@@ -721,7 +721,7 @@ void la_RecalcBlockRecursive(laBlock *b, int X, int Y, int W, int H){
|
|
|
p->X = X + LA_SEAM_W; p->Y = Y + LA_SEAM_W + TitleGap;
|
|
|
p->TX = X + LA_SEAM_W; p->TY = Y + LA_SEAM_W + TitleGap;
|
|
|
p->TW = W - LA_SEAM_W*2; p->TH = H - LA_SEAM_W*2 - TitleGap;
|
|
|
- p->Refresh |= LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(p);
|
|
|
}
|
|
|
}
|
|
|
void la_UpdateUiPlacement(laWindow *w){
|
|
@@ -733,7 +733,7 @@ void la_UpdateUiPlacement(laWindow *w){
|
|
|
int MenuHeight=(bt->TM+bt->BM)*2+LA_RH;
|
|
|
|
|
|
if(w->MaximizedUi && w->MaximizedUiPanel){
|
|
|
- w->MaximizedUiPanel->Refresh|=LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(w->MaximizedUiPanel);
|
|
|
}elif(w->MaximizedBlock){
|
|
|
la_RecalcBlockRecursive(w->MaximizedBlock, -LA_SEAM_W, MenuHeight, CW+LA_SEAM_W*2, CH-MenuHeight+LA_SEAM_W);
|
|
|
}else{
|
|
@@ -746,7 +746,7 @@ void la_UpdateUiPlacement(laWindow *w){
|
|
|
p->TH=p->H=MenuHeight;
|
|
|
}
|
|
|
la_EnsurePanelSnapping(p, CW, CH);
|
|
|
- p->Refresh |= LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(p);
|
|
|
}
|
|
|
}
|
|
|
void la_CommandResizeWindow(Window hwnd, int x, int y, int w, int h){
|
|
@@ -763,7 +763,7 @@ void la_CommandResizeWindow(Window hwnd, int x, int y, int w, int h){
|
|
|
int la_OnWindowDestroy(Window wnd){
|
|
|
laListHandle *hlst = &MAIN.Windows;
|
|
|
laWindow *w = lstFindItem(wnd, la_IsThisSysWindow, hlst);
|
|
|
- if (!w) return;
|
|
|
+ if (!w) return 0;
|
|
|
|
|
|
if (MAIN.Windows.pFirst==MAIN.Windows.pLast){
|
|
|
int empty=0; int mod=laRegisterModifications(1,1,&empty,0);
|
|
@@ -910,10 +910,9 @@ laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** Ba
|
|
|
lstAppendItem(&t->BoxedThemes, bt);
|
|
|
return bt;
|
|
|
}
|
|
|
-laBoxedTheme *laGetTheme(const char *ThemeName){
|
|
|
+laTheme *laGetTheme(const char *ThemeName){
|
|
|
laTheme *t = MAIN.Themes.pFirst;
|
|
|
for (t; t; t = t->Item.pNext){
|
|
|
- laBoxedTheme *bt;
|
|
|
if (strSame(t->Name->Ptr, ThemeName)) return t;
|
|
|
}
|
|
|
return 0;
|
|
@@ -1194,7 +1193,7 @@ void laEnsurePanelInBound(laPanel *p, laUiList *uil){
|
|
|
}
|
|
|
|
|
|
if (p->ST) p->TY = p->ST;
|
|
|
- if (p->SB && p->TH != ch - p->TY - p->SB) p->Refresh = LA_TAG_RECALC;
|
|
|
+ if (p->SB && p->TH != ch - p->TY - p->SB) laRecalcPanel(p);
|
|
|
if (p->SB) p->TH = ch - p->TY - p->SB;
|
|
|
|
|
|
if(p->CloseWhenMovedOut==2){ p->X=(cw-p->W)/2; p->Y=(ch-p->H)/2; }
|
|
@@ -1250,7 +1249,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
Color,
|
|
|
0, 0, 1 - p->AnimationRatio, 0);
|
|
|
p->AnimationRatio += (1 - p->AnimationRatio) * MAIN.PanelAnimationSpeed * MAIN.LastFrameTime * 60;
|
|
|
- if (p->AnimationRatio > 0.99) p->AnimationMode = 0;
|
|
|
+ if (p->AnimationRatio > 0.99) p->AnimationMode = 0; laRefreshWindow();
|
|
|
break;
|
|
|
|
|
|
case LA_PANEL_ANIMATION_EXPAND:
|
|
@@ -1266,7 +1265,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
Color,
|
|
|
0, 0, 0, 0);
|
|
|
p->AnimationRatio += (1 - p->AnimationRatio) * MAIN.PanelAnimationSpeed * MAIN.LastFrameTime * 60;
|
|
|
- if (p->AnimationRatio > 0.99) p->AnimationMode = 0;
|
|
|
+ if (p->AnimationRatio > 0.99) p->AnimationMode = 0; laRefreshWindow();
|
|
|
break;
|
|
|
|
|
|
case LA_PANEL_ANIMATION_DISSOVE:
|
|
@@ -1282,7 +1281,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
Color,
|
|
|
0, 0, 0, 0);
|
|
|
p->AnimationRatio -= (p->AnimationRatio) * MAIN.PanelAnimationSpeed * MAIN.LastFrameTime * 60;
|
|
|
- if (p->AnimationRatio < 0.01) p->AnimationMode = 0;
|
|
|
+ if (p->AnimationRatio < 0.01) p->AnimationMode = 0; laRefreshWindow();
|
|
|
break;
|
|
|
|
|
|
case LA_PANEL_ANIMATION_COLLAPSE:
|
|
@@ -1298,7 +1297,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
Color,
|
|
|
0, 0, 0, 0);
|
|
|
p->AnimationRatio -= p->AnimationRatio * MAIN.PanelAnimationSpeed * MAIN.LastFrameTime * 60;
|
|
|
- if (p->AnimationRatio < 0.01) p->AnimationMode = 0;
|
|
|
+ if (p->AnimationRatio < 0.01) p->AnimationMode = 0; laRefreshWindow();
|
|
|
break;
|
|
|
|
|
|
case LA_PANEL_ANIMATION_MINIMIZE:
|
|
@@ -1314,7 +1313,7 @@ void la_PanelDrawToWindow(laPanel *p, laWindow *w){
|
|
|
Color,
|
|
|
0, 0, 0, 0);
|
|
|
p->AnimationRatio -= p->AnimationRatio * MAIN.PanelAnimationSpeed * MAIN.LastFrameTime * 60;
|
|
|
- if (p->AnimationRatio < 0.01) p->AnimationMode = 0;
|
|
|
+ if (p->AnimationRatio < 0.01) p->AnimationMode = 0; laRefreshWindow();
|
|
|
break;
|
|
|
}
|
|
|
|
|
@@ -1384,7 +1383,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
laRecalcPanelImmediate(p);
|
|
|
}
|
|
|
if (!p->MenuRefer){
|
|
|
- if(!p->OffScr){la_PanelDrawToOffsceen(p,&p->UI); p->Refresh|=LA_TAG_REDRAW;}
|
|
|
+ if(!p->OffScr){la_PanelDrawToOffsceen(p,&p->UI); p->Refresh|=LA_TAG_REDRAW; laRefreshWindow(); }
|
|
|
if (p->Refresh || !p->OffScr){
|
|
|
la_PanelDrawToOffsceen(p, &p->UI);
|
|
|
la_SetupUiListLimitMatrix(&uild, 0, p->W, 0, p->H, p->H);
|
|
@@ -1406,9 +1405,9 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
if(p->Refresh&LA_TAG_RECALC_SCROLLER) DrawState_++;
|
|
|
|
|
|
if (!la_AnimateUiListRecursive(&p->TitleBar)) p->Refresh = 0;
|
|
|
- else p->Refresh = LA_TAG_ANIMATION;
|
|
|
- if (!la_AnimateUiListRecursive(&p->UI)) p->Refresh = p->Refresh;
|
|
|
- else p->Refresh = LA_TAG_ANIMATION;
|
|
|
+ else { p->Refresh = LA_TAG_ANIMATION; laRefreshWindow(); }
|
|
|
+ if (!la_AnimateUiListRecursive(&p->UI)){ p->Refresh = p->Refresh; if(p->Refresh){ laRefreshWindow(); } }
|
|
|
+ else { p->Refresh = LA_TAG_ANIMATION; laRefreshWindow(); }
|
|
|
DrawState_ += la_DrawUiListRecursive(&uild, &p->TitleBar, 0, p->W, 0, p->H, 10000, -1, 0, 0, 0);
|
|
|
if(p!=w->MaximizedUiPanel){
|
|
|
DrawState_ += la_DrawUiListRecursive(&uild, &p->UI, 0, p->W, 0, p->H, 10000, -1, 0, 0, 0);
|
|
@@ -1418,7 +1417,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
bt->LM,p->W-bt->RM,(p->H - p->TitleBar.B)/2+LA_RH2,LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP);
|
|
|
tnsFlush();
|
|
|
}
|
|
|
- if (DrawState_) p->Refresh = LA_TAG_RECALC;
|
|
|
+ if (DrawState_){ p->Refresh = LA_TAG_RECALC; laRefreshWindow(); }
|
|
|
}
|
|
|
}else{
|
|
|
if (p->Refresh || !p->OffScr){
|
|
@@ -1427,7 +1426,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
la_PanelBackgroundInit(p, bt);
|
|
|
la_DrawUiListScrollerV(p->MenuRefer, p->MenuRefer->PanY,
|
|
|
p->MenuRefer->B-p->MenuRefer->U-bt->TM-bt->BM, p->H-bt->TM-bt->BM*2, p->W);
|
|
|
- tnsFlush();
|
|
|
+ tnsFlush();
|
|
|
|
|
|
if(((p->MenuRefer->TB>p->H-bt->BP) && (!p->MenuRefer->ScrollerShownV))||
|
|
|
((p->MenuRefer->TB<=p->H-bt->BP) && p->MenuRefer->ScrollerShownV)){
|
|
@@ -1443,9 +1442,9 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
if(p->Refresh&LA_TAG_RECALC_SCROLLER) DrawState_++;
|
|
|
|
|
|
if (!la_AnimateUiListRecursive(p->MenuRefer)) p->Refresh = 0;
|
|
|
- else p->Refresh = LA_TAG_ANIMATION;
|
|
|
+ else { p->Refresh = LA_TAG_ANIMATION; laRefreshWindow(); }
|
|
|
DrawState_ += la_DrawUiListRecursive(&uild, p->MenuRefer, 0, p->W, 0, p->H, 10000, -1, 0, 0, 0);
|
|
|
- if (DrawState_) p->Refresh = LA_TAG_RECALC;
|
|
|
+ if (DrawState_){ p->Refresh = LA_TAG_RECALC; laRefreshWindow(); }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1784,7 +1783,7 @@ void la_WindowDefDraw(laWindow *w, laBoxedTheme *bt){
|
|
|
}
|
|
|
ui->Type->Draw(ui, LA_RH); tnsFlush();
|
|
|
if (!la_AnimateUiListRecursive(&p->UI)) p->Refresh = 0;
|
|
|
- else p->Refresh|=LA_TAG_ANIMATION;
|
|
|
+ else { p->Refresh|=LA_TAG_ANIMATION; laRefreshWindow(); }
|
|
|
}
|
|
|
tnsDrawToScreen();
|
|
|
tnsResetViewMatrix();
|
|
@@ -1798,7 +1797,7 @@ void la_WindowDefDraw(laWindow *w, laBoxedTheme *bt){
|
|
|
DrawState_+=la_DrawUiListRecursive(&uild, sub, ui->L, ui->R, ui->U, ui->B, 10000, 0, 0, 0, 0);
|
|
|
}
|
|
|
}
|
|
|
- if (DrawState_) p->Refresh = LA_TAG_RECALC;
|
|
|
+ if (DrawState_){ p->Refresh = LA_TAG_RECALC; laRefreshWindow(); }
|
|
|
}else{
|
|
|
laBlock* RootBlock= w->MaximizedBlock?w->MaximizedBlock:l->FirstBlock;
|
|
|
la_BlockDefDrawRecursive(w, bt, RootBlock);
|
|
@@ -1834,7 +1833,7 @@ void la_WindowDefDraw(laWindow *w, laBoxedTheme *bt){
|
|
|
NextP = p->Item.pPrev;
|
|
|
if (!p->AnimationMode){
|
|
|
lstRemoveItem(&w->FadingPanels, p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_DESTROY;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_DESTROY; laRefreshWindow();
|
|
|
laDeferredDestroyPanel(p, 0);
|
|
|
}else
|
|
|
la_PanelDrawToWindow(p, w);
|
|
@@ -1866,6 +1865,7 @@ laWindow *laDesignWindow(int X, int Y, int W, int H){
|
|
|
strSafeSet(&n->Title, "Empty Window");
|
|
|
n->X = X; n->Y = Y; n->W = W; n->H = H;
|
|
|
n->OutputShowStripes=1;
|
|
|
+ n->Redraw=1;
|
|
|
|
|
|
la_CreateSystemWindow(n, MAIN.Windows.pFirst!=0);
|
|
|
|
|
@@ -1913,20 +1913,20 @@ void laMaximizeCanvasUI(laUiItem* ui, laPanel* UiParentPanel){
|
|
|
laRestoreCanvasUI();
|
|
|
if(!ui->Type||(!(ui->Type->Tag&LA_UI_TAG_IS_OFFSCREEN))||!UiParentPanel) return;
|
|
|
la_StopUiOperatorService(UiParentPanel); la_StopUiOperatorService(ui); laRetriggerOperators();
|
|
|
- laWindow* w=MAIN.CurrentWindow; w->MaximizedUi=ui; w->MaximizedUiPanel=UiParentPanel; UiParentPanel->Refresh |= LA_TAG_RECALC;
|
|
|
+ laWindow* w=MAIN.CurrentWindow; w->MaximizedUi=ui; w->MaximizedUiPanel=UiParentPanel; laRecalcPanel(UiParentPanel);
|
|
|
UiParentPanel->Show=0;
|
|
|
laNotifyUsers("la.windows.maximized_ui"); laHideMenuBar();
|
|
|
}
|
|
|
void laRestoreCanvasUI(){
|
|
|
laWindow* w=MAIN.CurrentWindow; if(!w->MaximizedUi || !w->MaximizedUiPanel) return;
|
|
|
la_StopUiOperatorService(w->MaximizedUi); laRetriggerOperators(); w->MaximizedUiPanel->Show=1;
|
|
|
- w->MaximizedUiPanel->Refresh |= LA_TAG_RECALC; w->MaximizedUi=0; w->MaximizedUiPanel=0; la_UpdateUiPlacement(w);
|
|
|
+ laRecalcPanel(w->MaximizedUiPanel); w->MaximizedUi=0; w->MaximizedUiPanel=0; la_UpdateUiPlacement(w);
|
|
|
laNotifyUsers("la.windows.maximized_ui"); laShowMenuBar();
|
|
|
}
|
|
|
void laHideMenuBar(){ laWindow* w=MAIN.CurrentWindow; if(!w->MaximizedUi || !w->MaximizedUiPanel) return;
|
|
|
- for(laPanel* p=MAIN.CurrentWindow->Panels.pFirst;p;p=p->Item.pNext){ if(p->IsMenuPanel){ p->Show=0; break; } }
|
|
|
+ for(laPanel* p=MAIN.CurrentWindow->Panels.pFirst;p;p=p->Item.pNext){ if(p->IsMenuPanel){ p->Show=0; laRefreshWindow(); break; } }
|
|
|
}
|
|
|
-void laShowMenuBar(){ for(laPanel* p=MAIN.CurrentWindow->Panels.pFirst;p;p=p->Item.pNext){ if(p->IsMenuPanel){ p->Show=1; break; } } }
|
|
|
+void laShowMenuBar(){ for(laPanel* p=MAIN.CurrentWindow->Panels.pFirst;p;p=p->Item.pNext){ if(p->IsMenuPanel){ p->Show=1; laRefreshWindow(); break; } } }
|
|
|
void laSplitBlockHorizon(laBlock *b, real Percentage){
|
|
|
laPanel *p;
|
|
|
b->SplitRatio = Percentage;
|
|
@@ -2044,7 +2044,7 @@ laPanel* laTearOffPanel(laBlock* b, laPanel* p_if_set){
|
|
|
p->TY-=LA_RH;
|
|
|
p->TH+=LA_RH;
|
|
|
|
|
|
- p->Refresh=LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(p);
|
|
|
la_RecalcBlockRecursive(b, b->X,b->Y,b->W,b->H);
|
|
|
p->BT = &_LA_THEME_FLOATING_PANEL;
|
|
|
p->Block = 0;
|
|
@@ -2065,7 +2065,7 @@ void laDockPanel(laWindow* from, laBlock* b, laPanel* p){
|
|
|
p->Block=b;
|
|
|
b->CurrentPanel = p;
|
|
|
lstPushItem(&b->Panels, p);
|
|
|
- p->Refresh=LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(p);
|
|
|
p->BT = &_LA_THEME_PANEL;
|
|
|
la_RecalcBlockRecursive(b, b->X,b->Y,b->W,b->H);
|
|
|
tnsFlush();
|
|
@@ -2154,7 +2154,7 @@ laPanel *la_NewPanel(laUiTemplate* uit, int X, int Y, int W, int H, int MaxW, in
|
|
|
|
|
|
la_EnsurePanelExtras(p);
|
|
|
|
|
|
- p->Refresh = LA_TAG_RECALC;
|
|
|
+ laRecalcPanel(p);
|
|
|
p->FrameDistinguish = 100; //greater than 1 is ok
|
|
|
|
|
|
if(uit&&uit->PropFunc){ uit->PropFunc(p); }
|
|
@@ -2178,8 +2178,8 @@ laPanel *laCreatePanelT(laBlock *b, laUiTemplate* uit){
|
|
|
p->PP.LastPs->Type = L'.';
|
|
|
|
|
|
la_EnsurePanelExtras(p);
|
|
|
-
|
|
|
- p->Refresh = LA_TAG_RECALC;
|
|
|
+
|
|
|
+ laRecalcPanel(p);
|
|
|
p->FrameDistinguish = 100; //greater than 1 is ok
|
|
|
|
|
|
p->TitleWidth = tnsStringGetWidth(transLate(p->Title->Ptr), 0, 0);
|
|
@@ -2222,12 +2222,12 @@ void laShowPanel(laPanel *p){
|
|
|
}
|
|
|
void laShowPanelWithDropDownEffect(laPanel *p){
|
|
|
laShowPanel(p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_DROP_DOWN;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_DROP_DOWN; laRefreshWindow();
|
|
|
p->AnimationRatio = 0;
|
|
|
}
|
|
|
void laShowPanelWithExpandEffect(laPanel *p){
|
|
|
laShowPanel(p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_EXPAND;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_EXPAND; laRefreshWindow();
|
|
|
p->AnimationRatio = 0;
|
|
|
}
|
|
|
void laHidePanel(laPanel *p){
|
|
@@ -2238,19 +2238,19 @@ void laHidePanel(laPanel *p){
|
|
|
void laHidePanelWithDissoveEffect(laPanel *p){
|
|
|
if (!p->Mode) return;
|
|
|
laHidePanel(p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_DISSOVE;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_DISSOVE; laRefreshWindow();
|
|
|
p->AnimationRatio = 1;
|
|
|
}
|
|
|
void laHidePanelWithCollapseEffect(laPanel *p){
|
|
|
if (!p->Mode) return;
|
|
|
laHidePanel(p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_COLLAPSE;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_COLLAPSE; laRefreshWindow();
|
|
|
p->AnimationRatio = 1;
|
|
|
}
|
|
|
void laHidePanelWithMinimizeEffect(laPanel *p){
|
|
|
if (!p->Mode) return;
|
|
|
laHidePanel(p);
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_MINIMIZE;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_MINIMIZE; laRefreshWindow();
|
|
|
p->AnimationRatio = 1;
|
|
|
}
|
|
|
void laActivatePanel(char* TemplateID, int x, int y){
|
|
@@ -2427,7 +2427,7 @@ void laDestroySinglePanel(laPanel *p, int immediate){
|
|
|
la_DestroyUiList(p->MenuRefer, 0, 1, 1);
|
|
|
|
|
|
if (p->Mode){
|
|
|
- p->AnimationMode = LA_PANEL_ANIMATION_DISSOVE;
|
|
|
+ p->AnimationMode = LA_PANEL_ANIMATION_DISSOVE; laRefreshWindow();
|
|
|
p->AnimationRatio = p->CloseWhenMovedOut?0.0:1.0;
|
|
|
}
|
|
|
|
|
@@ -2466,7 +2466,7 @@ int laEnclosePanelContent(laPanel *p, laUiList *uil){
|
|
|
if(p->TW>CW){ p->TW=CW; }
|
|
|
la_UpdateUiListRecursive(&p->TitleBar, bt->TM, bt->LM, p->TW - bt->LM-bt->RM, p->TH, 0, p);
|
|
|
la_UpdateUiListRecursive(uil, bt->TM+p->TitleBar.B, bt->LM, p->TW - bt->RM - ScrollerW, 0, 0, p);
|
|
|
- p->Refresh=LA_TAG_REDRAW;
|
|
|
+ laRedrawPanel(p);
|
|
|
return 1;
|
|
|
}
|
|
|
laPanel *laEnableIdlePanel(laPanel *Attachment, laOperator *a, laPropPack *OperatorProps, laUiDefineFunc ReplaceUiDefine, laPropPack *This,
|
|
@@ -2501,7 +2501,7 @@ laPanel *laEnableSplashPanel(laUiDefineFunc ReplaceUiDefine, int L, int R, int B
|
|
|
int b;
|
|
|
laUiDefineFunc def = ReplaceUiDefine;
|
|
|
int MinW;
|
|
|
- if (!def) return;
|
|
|
+ if (!def) return 0;
|
|
|
GX = L; GY = B; GW = (R - L) > MaxW ? MaxW : (R - L);
|
|
|
p = laDesignPropPanel("TMP", GX, GY, GW, MaxGH, def, 0, 0);
|
|
|
p->Mode = LA_PANEL_FLOATING_TOP;
|
|
@@ -2770,14 +2770,17 @@ void laRedrawAllWindows(){ if((!MAIN.CurrentWindow) || (!MAIN.CurrentWindow->win
|
|
|
void laRedrawCurrentWindow(){ if((!MAIN.CurrentWindow) || (!MAIN.CurrentWindow->win)) return;
|
|
|
if (MAIN.CurrentWindow) la_UpdateUiPlacement(MAIN.CurrentWindow);
|
|
|
}
|
|
|
+void laRefreshWindow(){ MAIN.CurrentWindow->Redraw=1; }
|
|
|
+void laRedrawPanel(laPanel* p){ p->Refresh |= LA_TAG_REDRAW; MAIN.CurrentWindow->Redraw=1; }
|
|
|
+void laRecalcPanel(laPanel* p){ p->Refresh |= LA_TAG_RECALC; MAIN.CurrentWindow->Redraw=1; }
|
|
|
void laRedrawCurrentPanel(){
|
|
|
- if (MAIN.CurrentPanel) MAIN.CurrentPanel->Refresh |= LA_TAG_REDRAW;
|
|
|
- elif (MAIN.CurrentWindow->MaximizedUiPanel) MAIN.CurrentWindow->MaximizedUiPanel->Refresh |= LA_TAG_REDRAW;
|
|
|
+ if (MAIN.CurrentPanel) laRedrawPanel(MAIN.CurrentPanel);
|
|
|
+ elif (MAIN.CurrentWindow->MaximizedUiPanel) laRedrawPanel(MAIN.CurrentWindow->MaximizedUiPanel);
|
|
|
}
|
|
|
void laRecalcCurrentPanel(){
|
|
|
- if (MAIN.CurrentPanel) MAIN.CurrentPanel->Refresh |= LA_TAG_RECALC;
|
|
|
- elif (MAIN.CurrentWindow->MaximizedUiPanel) MAIN.CurrentWindow->MaximizedUiPanel->Refresh |= LA_TAG_RECALC;
|
|
|
-}
|
|
|
+ if (MAIN.CurrentPanel) laRecalcPanel(MAIN.CurrentPanel);
|
|
|
+ elif (MAIN.CurrentWindow->MaximizedUiPanel) laRecalcPanel(MAIN.CurrentWindow->MaximizedUiPanel);
|
|
|
+}
|
|
|
void laRecalcPanelImmediate(laPanel* p){
|
|
|
p->FrameDistinguish++;
|
|
|
laBoxedTheme* bt = (*p->BT);
|
|
@@ -2962,6 +2965,13 @@ int laIsInBlock(laBlock *b, int X, int Y){
|
|
|
int laIsInBlockHeader(laBlock *b, int X, int Y){ if (X >= b->X && X <= b->X + b->W && Y >= b->Y && Y <= b->Y + LA_RH) return 1; return 0; }
|
|
|
int laIsInBlockBotton1(laBlock *b, int X, int Y){ if (X >= b->X && X <= b->X + LA_RH && Y >= b->Y && Y <= b->Y + LA_RH) return 1; return 0; }
|
|
|
int laIsInBlockBotton2(laBlock *b, int X, int Y){ if (X >= b->X+LA_RH && X <= b->X+LA_2RH && Y >= b->Y && Y <= b->Y + LA_RH) return 1; return 0; }
|
|
|
+laBlock *laClearBlockButtonRecursive(laBlock *b, laBlock *except){
|
|
|
+ if(b->B1){laClearBlockButtonRecursive(b->B1,except);}
|
|
|
+ if(b->B2){laClearBlockButtonRecursive(b->B2,except);}
|
|
|
+ if (!b->B1 && !b->B2){
|
|
|
+ if(b!=except && b->OnButton){ b->OnButton=0; laRefreshWindow(); }
|
|
|
+ }
|
|
|
+}
|
|
|
laBlock *laDetectBlockRecursive(laBlock *b, int X, int Y){
|
|
|
laPanel *p;
|
|
|
laBlock *sb = 0;
|
|
@@ -3188,7 +3198,7 @@ void la_AssignCanvasPropExtras(laUiItem* ui){
|
|
|
laUiItem *la_UpdatePropDisplay(laUiItem *ui, laPropPack *Base, const char *Path, laUiDefineFunc Template, laWidget* Widget, char* instructions){
|
|
|
int result;
|
|
|
|
|
|
- if (!ui) return;
|
|
|
+ if (!ui) return 0;
|
|
|
|
|
|
laUiType* OverrideType=Widget&&Widget->Type?Widget->Type:0;
|
|
|
|
|
@@ -3585,7 +3595,7 @@ laUiConditionNode *laLessEqual(laUiConditionNode *Expression1, laUiConditionNode
|
|
|
}
|
|
|
int la_GetIntConditionValue(laUiConditionNode *Expression){
|
|
|
if (Expression->Type != LA_CONDITION_INT) return 0;
|
|
|
- return Expression->Expression1;
|
|
|
+ return Expression->IntValue;
|
|
|
}
|
|
|
real la_GetFloatConditionValue(laUiConditionNode *Expression){
|
|
|
if (Expression->Type != LA_CONDITION_FLOAT) return 0;
|
|
@@ -4122,7 +4132,7 @@ void la_CreateUiAfter(laUiList *uil, laUiItem *after, laUiDefineFunc Define, laP
|
|
|
// }
|
|
|
//}
|
|
|
void la_PropPanelUserRemover(void* this_UNUSED, laItemUserLinker* iul){
|
|
|
- laPanel* p = iul->Pointer.p; if(p->FrameDistinguish == iul->FrameDistinguish){ p->Refresh |= LA_TAG_RECALC; }
|
|
|
+ laPanel* p = iul->Pointer.p; if(p->FrameDistinguish == iul->FrameDistinguish){ laRecalcPanel(p); }
|
|
|
}
|
|
|
void la_CalcUiItemInfluence(laListHandle *lst, laUiItem *ui){
|
|
|
laColumn *c = ui->C;
|
|
@@ -4241,7 +4251,7 @@ int la_InitRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt){
|
|
|
ri->U=ui->TU; ri->L=ui->TL;
|
|
|
ri->MaxB=ui->TU;
|
|
|
}
|
|
|
-int la_AddRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt, int H){
|
|
|
+void la_AddRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt, int H){
|
|
|
laRowNode* rn=CreateNew(laRowNode);
|
|
|
rn->LP=bt->LP;rn->RP=bt->RP;
|
|
|
rn->GotW = (ui->Type->GetMinWidth?ui->Type->GetMinWidth(ui):(LA_RH)) +bt->LM+bt->RM;
|
|
@@ -4278,7 +4288,7 @@ int la_CalculateRowExpand(laRowInfo* ri, laUiItem* ui_end, int WaitAnimation){
|
|
|
if(!ri->Expand && Available>0){Available=0;}
|
|
|
ShareCount=ri->ExpandAccum?ri->ExpandAccum:ri->CountElements;
|
|
|
}
|
|
|
- if(!ShareCount) return;
|
|
|
+ if(!ShareCount) return 0;
|
|
|
int PerNode = Available/ShareCount;
|
|
|
int Remaining = Available-PerNode*ShareCount;
|
|
|
int L = ri->L; int i=0; laRowNode* rn;
|
|
@@ -4329,7 +4339,7 @@ void la_RecordSocketRuntimePosition(laUiItem* ui){
|
|
|
}
|
|
|
}
|
|
|
laUiList* la_GiveExistingPage(laListHandle* from, void* instance){
|
|
|
- for(laUiList* uil=from->pFirst;uil;uil=uil->Item.pNext){ if(uil->Instance == instance){ lstRemoveItem(from,uil); return uil; } }
|
|
|
+ for(laUiList* uil=from->pFirst;uil;uil=uil->Item.pNext){ if(uil->Instance == instance){ lstRemoveItem(from,uil); return uil; } } return 0;
|
|
|
}
|
|
|
int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast, laPanel *ParentPanel){
|
|
|
laUiItem *ui; laListHandle TempPages={0}; laUiList* FoundUil;
|
|
@@ -4387,7 +4397,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
//}
|
|
|
|
|
|
if ((ui->AnimationDistinguish + 1) == ParentPanel->FrameDistinguish){
|
|
|
- ParentPanel->Refresh |= LA_TAG_ANIMATION;
|
|
|
+ ParentPanel->Refresh |= LA_TAG_ANIMATION; laRefreshWindow();
|
|
|
WaitAnimation = 1;
|
|
|
}
|
|
|
ui->AnimationDistinguish = ParentPanel->FrameDistinguish;
|
|
@@ -4668,7 +4678,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
if((subh<ui->Page->TB-ui->Page->TU && (!ui->Page->ScrollerShownV)) ||
|
|
|
(subh>=ui->Page->TB-ui->Page->TU && ui->Page->ScrollerShownV)){
|
|
|
ui->Page->ScrollerShownV=!ui->Page->ScrollerShownV;
|
|
|
- ParentPanel->Refresh|=LA_TAG_RECALC_SCROLLER;
|
|
|
+ ParentPanel->Refresh|=LA_TAG_RECALC_SCROLLER; laRefreshWindow();
|
|
|
}
|
|
|
if(SubB-ui->Page->PanY<ui->TB-bt->BM-(ui->Page->ScrollerShownH?LA_SCROLL_W+bt->BM:0)){
|
|
|
ui->Page->PanY = (SubB-ui->TB-bt->BM+(ui->Page->ScrollerShownH?LA_SCROLL_W+bt->BM:0));
|
|
@@ -5053,7 +5063,7 @@ int la_DrawUiListRecursive(laUiListDraw *uild, laUiList *uil, int L, int R, int
|
|
|
laUiListDrawItem *uildi;
|
|
|
int Ret = 0;
|
|
|
|
|
|
- if (!uil) return;
|
|
|
+ if (!uil) return 0;
|
|
|
|
|
|
//printf("d %d\n",MAIN.CurrentPanel->FrameDistinguish);
|
|
|
|
|
@@ -6391,7 +6401,7 @@ int la_AllowInput(uint32_t ch){
|
|
|
int laCopyToClipboard(unsigned char * text){
|
|
|
XEvent event; Window owner, window=MAIN.CurrentWindow->win;
|
|
|
XSetSelectionOwner(MAIN.dpy, MAIN.selection, window, 0);
|
|
|
- if (XGetSelectionOwner (MAIN.dpy, MAIN.selection) != window) return;
|
|
|
+ if (XGetSelectionOwner (MAIN.dpy, MAIN.selection) != window) return 0;
|
|
|
strSafeSet(&MAIN.CopyPending, text);
|
|
|
}
|
|
|
int la_ProcessSysMessage(){
|
|
@@ -6504,7 +6514,7 @@ int la_ProcessSysMessage(){
|
|
|
if ((R & 2) == 0) XSendEvent (MAIN.dpy, ev.requestor, 0, 0, (XEvent *)&ev);
|
|
|
break;
|
|
|
case SelectionClear:
|
|
|
- return;
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -6529,7 +6539,8 @@ void la_PrintOperatorStack(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-int la_DrawWindow(laWindow *w){
|
|
|
+void la_DrawWindow(laWindow *w){
|
|
|
+ if(!w->Redraw) return; w->Redraw=0; w->RedrawTouched=1;
|
|
|
MAIN.CurrentWindow = w;
|
|
|
la_WindowDefDraw(w, 0);
|
|
|
}
|
|
@@ -6578,6 +6589,7 @@ void laMainLoop(){
|
|
|
la_DrawWindow(w);
|
|
|
}
|
|
|
for(w=MAIN.Windows.pFirst;w;w=w->Item.pNext){
|
|
|
+ if(!w->RedrawTouched) continue; w->RedrawTouched=0;
|
|
|
glXSwapBuffers(MAIN.dpy, w->win); //XSync(MAIN.dpy,0);
|
|
|
}
|
|
|
|