*/}}
Browse Source

copyright and optimizations

YimingWu 1 year ago
parent
commit
6fa9aa74de
8 changed files with 43 additions and 13 deletions
  1. 24 0
      README
  2. 4 2
      calculator.c
  3. 3 3
      example_viewer.c
  4. 4 2
      fruits.c
  5. 4 2
      modelling_main.c
  6. 1 1
      simplest.c
  7. 1 1
      widget_flags.c
  8. 2 2
      widgets.c

+ 24 - 0
README

@@ -0,0 +1,24 @@
+# LaGUI 示例程序包
+
+LaGUI 示例程序包用于演示 LaGUI 功能和为您编写程序提供参考。
+
+版权所有 (C) 2022-2023 吴奕茗
+
+了解更多: https://ChengduLittleA.com/lagui
+
+LaGUI 和 LaGUI 实例程序包采用 GNU GPL v3 许可证,Noto 字体采用 SIL Open Font 许可证
+您将在源代码文件夹找到许可证的具体信息。
+
+-----------------
+
+# LaGUI demostration programs
+
+LaGUI demonstration programs are provided for you as a reference to making your own programs.
+
+Copyright (C) 2022-2023 Wu Yiming
+
+Learn more about LaGUI: https://ChengduLittleA.com/lagui
+
+LaGUI and LaGUI demonstration programs are licensed with GNU GPL v3, and
+Noto fonts are licensed with SIL Open Font license.
+You should be able to find details about the license in the source code directory.

+ 4 - 2
calculator.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -377,7 +377,9 @@ int main(int argc, char *argv[]){
     RegisterCalculator();
 
     laRefreshUDFRegistries();
-    laEnsureUserPreferences();
+    
+    // Use this to save and load preference when exit and during start up
+    // laEnsureUserPreferences();
     
     laAddRootDBInst("calc");
 

+ 3 - 3
example_viewer.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -76,7 +76,7 @@ static void ExamplesCleanUp(){
         laShowItemFull(uil,c,0,"EXAMPLE_open_source_code",0,instructions,0,0);\
         laEndRow(uil,row);\
         laShowSeparator(uil,c);\
-        laShowItem(uil,c,This,"code")->Extra->HeightCoeff=-2;\
+        laShowItem(uil,c,This,"base.code")->Extra->HeightCoeff=-2;\
     }laElse(uil,bu);{\
         row=laBeginRow(uil,c,0,0);\
         char instructions[256]; sprintf(instructions,"text=Launch \"%s\";program=%s",ei->Name->Ptr,ei->Path->Ptr);\
@@ -236,7 +236,7 @@ laPropContainer *pcGeneric,*pcFruits,*pcSimplest,*pcModelling,*pcCalculator,*pcW
 void* get_ExampleViewer(void* unused){
     return EV;
 }
-laPropContainer* get_ExamplesGetType(void* unused, ExampleItem* ei){
+laPropContainer* get_ExamplesGetType(ExampleItem* ei){
     if(ei->Define==ui_Fruits) return pcFruits;
     if(ei->Define==ui_Simplest) return pcSimplest;
     if(ei->Define==ui_Modelling) return pcModelling;

+ 4 - 2
fruits.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -322,7 +322,9 @@ int main(int argc, char *argv[]){
     RegisterEverything();
 
     laRefreshUDFRegistries();
-    laEnsureUserPreferences();
+    
+    // Use this to save and load preference when exit and during start up
+    // laEnsureUserPreferences();
     
     laAddRootDBInst("basket");
 

+ 4 - 2
modelling_main.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -58,7 +58,9 @@ int main(int argc, char *argv[]){
     RegisterEverything();
 
     laRefreshUDFRegistries();
-    laEnsureUserPreferences();
+    
+    // Use this to save and load preference when exit and during start up
+    // laEnsureUserPreferences();
 
     laSaveProp("tns.world");
     laAddRootDBInst("tns"); 

+ 1 - 1
simplest.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

+ 1 - 1
widget_flags.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by

+ 2 - 2
widgets.c

@@ -1,6 +1,6 @@
 /*
 * Part of LaGUI demonstration programs
-* Copyright (C) 2022 Wu Yiming
+* Copyright (C) 2022-2023 Wu Yiming
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -54,7 +54,7 @@ void Widgets(laUiList *uil, laPropPack *This, laPropPack *DetachedProps, laColum
     laShowSeparator(uil,c);
 
     laShowLabel(uil,cl,"This is a 3D viewer",0,0);
-    laShowCanvas(uil,cl,0,"tns.world","la_3DView",6);
+    laShowCanvas(uil,cl,0,0,"la_3DView",6);
     laShowLabel(uil,cr,"And this is 2D",0,0);
     laCanvasExtra*ce=laShowCanvas(uil,cr,0,"tns.texture_list",0,6)->Extra; ce->ZoomX=10; ce->ZoomY=10;
 }