Converted sci_uigetfont.c to cpp 36/18136/6
Dhruv Khattar [Tue, 3 May 2016 14:05:56 +0000 (19:05 +0530)]
Change-Id: I796c9fa399b755b1b561c8142abe5806ba7d137d

scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/sci_gateway/cpp/sci_uigetfont.cpp [moved from scilab/modules/gui/sci_gateway/c/sci_uigetfont.c with 98% similarity]
scilab/modules/gui/src/c/gui.vcxproj
scilab/modules/gui/src/c/gui.vcxproj.filters

index 9ac0347..77294a3 100644 (file)
@@ -187,7 +187,6 @@ GATEWAY_C_SOURCES = \
     sci_gateway/c/sci_messagebox.c \
     sci_gateway/c/sci_waitbar.c \
     sci_gateway/c/sci_progressionbar.c \
-    sci_gateway/c/sci_uigetfont.c \
     sci_gateway/c/sci_uigetcolor.c \
     sci_gateway/c/sci_getcallbackobject.c \
     sci_gateway/c/sci_exportUI.c \
@@ -202,6 +201,7 @@ GATEWAY_CXX_SOURCES = \
     sci_gateway/cpp/sci_getlookandfeel.cpp \
     sci_gateway/cpp/sci_uigetdir.cpp \
     sci_gateway/cpp/sci_uigetfile.cpp \
+    sci_gateway/cpp/sci_uigetfont.cpp \
     sci_gateway/cpp/sci_displaytree.cpp \
     sci_gateway/cpp/sci_uiputfile.cpp \
     sci_gateway/cpp/sci_about.cpp \
index 03abfa0..94dc2f7 100644 (file)
@@ -314,7 +314,6 @@ am__objects_5 = sci_gateway/c/libscigui_la-sci_x_choice.lo \
        sci_gateway/c/libscigui_la-sci_messagebox.lo \
        sci_gateway/c/libscigui_la-sci_waitbar.lo \
        sci_gateway/c/libscigui_la-sci_progressionbar.lo \
-       sci_gateway/c/libscigui_la-sci_uigetfont.lo \
        sci_gateway/c/libscigui_la-sci_uigetcolor.lo \
        sci_gateway/c/libscigui_la-sci_getcallbackobject.lo \
        sci_gateway/c/libscigui_la-sci_exportUI.lo \
@@ -327,6 +326,7 @@ am__objects_6 = sci_gateway/cpp/libscigui_la-sci_printsetupbox.lo \
        sci_gateway/cpp/libscigui_la-sci_getlookandfeel.lo \
        sci_gateway/cpp/libscigui_la-sci_uigetdir.lo \
        sci_gateway/cpp/libscigui_la-sci_uigetfile.lo \
+       sci_gateway/cpp/libscigui_la-sci_uigetfont.lo \
        sci_gateway/cpp/libscigui_la-sci_displaytree.lo \
        sci_gateway/cpp/libscigui_la-sci_uiputfile.lo \
        sci_gateway/cpp/libscigui_la-sci_about.lo \
@@ -889,7 +889,6 @@ GATEWAY_C_SOURCES = \
     sci_gateway/c/sci_messagebox.c \
     sci_gateway/c/sci_waitbar.c \
     sci_gateway/c/sci_progressionbar.c \
-    sci_gateway/c/sci_uigetfont.c \
     sci_gateway/c/sci_uigetcolor.c \
     sci_gateway/c/sci_getcallbackobject.c \
     sci_gateway/c/sci_exportUI.c \
@@ -904,6 +903,7 @@ GATEWAY_CXX_SOURCES = \
     sci_gateway/cpp/sci_getlookandfeel.cpp \
     sci_gateway/cpp/sci_uigetdir.cpp \
     sci_gateway/cpp/sci_uigetfile.cpp \
+    sci_gateway/cpp/sci_uigetfont.cpp \
     sci_gateway/cpp/sci_displaytree.cpp \
     sci_gateway/cpp/sci_uiputfile.cpp \
     sci_gateway/cpp/sci_about.cpp \
@@ -1558,9 +1558,6 @@ sci_gateway/c/libscigui_la-sci_waitbar.lo:  \
 sci_gateway/c/libscigui_la-sci_progressionbar.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
-sci_gateway/c/libscigui_la-sci_uigetfont.lo:  \
-       sci_gateway/c/$(am__dirstamp) \
-       sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/c/libscigui_la-sci_uigetcolor.lo:  \
        sci_gateway/c/$(am__dirstamp) \
        sci_gateway/c/$(DEPDIR)/$(am__dirstamp)
@@ -1603,6 +1600,9 @@ sci_gateway/cpp/libscigui_la-sci_uigetdir.lo:  \
 sci_gateway/cpp/libscigui_la-sci_uigetfile.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libscigui_la-sci_uigetfont.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/libscigui_la-sci_displaytree.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
@@ -1704,7 +1704,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uicontextmenu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uicontrol.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetcolor.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetfont.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uimenu.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uiwait.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/c/$(DEPDIR)/libscigui_la-sci_unsetmenu.Plo@am__quote@
@@ -1741,6 +1740,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_toprint.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetdir.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetfile.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetfont.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uiputfile.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_usecanvas.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_useeditor.Plo@am__quote@
@@ -2065,13 +2065,6 @@ sci_gateway/c/libscigui_la-sci_progressionbar.lo: sci_gateway/c/sci_progressionb
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscigui_la-sci_progressionbar.lo `test -f 'sci_gateway/c/sci_progressionbar.c' || echo '$(srcdir)/'`sci_gateway/c/sci_progressionbar.c
 
-sci_gateway/c/libscigui_la-sci_uigetfont.lo: sci_gateway/c/sci_uigetfont.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscigui_la-sci_uigetfont.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetfont.Tpo -c -o sci_gateway/c/libscigui_la-sci_uigetfont.lo `test -f 'sci_gateway/c/sci_uigetfont.c' || echo '$(srcdir)/'`sci_gateway/c/sci_uigetfont.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetfont.Tpo sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetfont.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='sci_gateway/c/sci_uigetfont.c' object='sci_gateway/c/libscigui_la-sci_uigetfont.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sci_gateway/c/libscigui_la-sci_uigetfont.lo `test -f 'sci_gateway/c/sci_uigetfont.c' || echo '$(srcdir)/'`sci_gateway/c/sci_uigetfont.c
-
 sci_gateway/c/libscigui_la-sci_uigetcolor.lo: sci_gateway/c/sci_uigetcolor.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sci_gateway/c/libscigui_la-sci_uigetcolor.lo -MD -MP -MF sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetcolor.Tpo -c -o sci_gateway/c/libscigui_la-sci_uigetcolor.lo `test -f 'sci_gateway/c/sci_uigetcolor.c' || echo '$(srcdir)/'`sci_gateway/c/sci_uigetcolor.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetcolor.Tpo sci_gateway/c/$(DEPDIR)/libscigui_la-sci_uigetcolor.Plo
@@ -2754,6 +2747,13 @@ sci_gateway/cpp/libscigui_la-sci_uigetfile.lo: sci_gateway/cpp/sci_uigetfile.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscigui_la-sci_uigetfile.lo `test -f 'sci_gateway/cpp/sci_uigetfile.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_uigetfile.cpp
 
+sci_gateway/cpp/libscigui_la-sci_uigetfont.lo: sci_gateway/cpp/sci_uigetfont.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscigui_la-sci_uigetfont.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetfont.Tpo -c -o sci_gateway/cpp/libscigui_la-sci_uigetfont.lo `test -f 'sci_gateway/cpp/sci_uigetfont.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_uigetfont.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetfont.Tpo sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_uigetfont.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_uigetfont.cpp' object='sci_gateway/cpp/libscigui_la-sci_uigetfont.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscigui_la-sci_uigetfont.lo `test -f 'sci_gateway/cpp/sci_uigetfont.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_uigetfont.cpp
+
 sci_gateway/cpp/libscigui_la-sci_displaytree.lo: sci_gateway/cpp/sci_displaytree.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscigui_la-sci_displaytree.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_displaytree.Tpo -c -o sci_gateway/cpp/libscigui_la-sci_displaytree.lo `test -f 'sci_gateway/cpp/sci_displaytree.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_displaytree.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_displaytree.Tpo sci_gateway/cpp/$(DEPDIR)/libscigui_la-sci_displaytree.Plo
@@ -12,6 +12,9 @@
  * along with this program.
  *
  */
+
+extern "C"
+{
 #include <string.h>
 #include "gw_gui.h"
 #include "api_scilab.h"
@@ -20,6 +23,7 @@
 #include "CallFontChooser.h"
 #include "getPropertyAssignedValue.h"
 #include "freeArrayOfString.h"
+}
 
 /*--------------------------------------------------------------------------*/
 int sci_uigetfont(char *fname, void* pvApiCtx)
@@ -211,13 +215,13 @@ int sci_uigetfont(char *fname, void* pvApiCtx)
     /* Default bold */
     if (boldAdr != 0)
     {
-        setFontChooserBold(fontChooserID, boldAdr[0]);
+        setFontChooserBold(fontChooserID, booltoBOOL(boldAdr[0]));
     }
 
     /* Default italic */
     if (italicAdr != 0)
     {
-        setFontChooserItalic(fontChooserID, italicAdr[0]);
+        setFontChooserItalic(fontChooserID, booltoBOOL(italicAdr[0]));
     }
 
     /* Display it and wait for a user input */
@@ -247,7 +251,7 @@ int sci_uigetfont(char *fname, void* pvApiCtx)
                 return 1;
             }
         }
-        
+
         if (selectedFontName)
         {
             freeAllocatedSingleString(selectedFontName);
index ab62686..0d9e28c 100755 (executable)
     <ClCompile Include="..\..\sci_gateway\c\sci_uigetcolor.c" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_uigetdir.cpp" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_uigetfile.cpp" />
-    <ClCompile Include="..\..\sci_gateway\c\sci_uigetfont.c" />
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_uigetfont.cpp" />
     <ClCompile Include="..\..\sci_gateway\c\sci_uimenu.c" />
     <ClCompile Include="..\..\sci_gateway\cpp\sci_uiputfile.cpp" />
     <ClCompile Include="..\..\sci_gateway\c\sci_uiwait.c" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index 15cc783..514e13e 100755 (executable)
     <ClCompile Include="..\..\sci_gateway\cpp\sci_uigetfile.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\sci_gateway\c\sci_uigetfont.c">
+    <ClCompile Include="..\..\sci_gateway\cpp\sci_uigetfont.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\sci_gateway\c\sci_uimenu.c">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>