Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help needed..
#11
Is there a free version of the PDFLib or is it only commerical. On the website all I can find is the 450 Euro version. Or is this for the PDF-Lite version?
Reply
#12
Yeah, it's the lite version, sorry.. the lib built is at http://gnuwin32.sourceforge.net/packages/pdflib.htm
Reply
#13
As to credit for the example... however you like, (to use a local phrase) this is your picnic, I'm just happy to be invited. :-)

If you want to use real names as opposed to handles mine is:
Randy Keeling
randy@keeling.com
www.randy.keeling.com

(I can see my spam count go up already :-) )


As for the pdf libraries.... I will look at them later. If someone else is already working on examples it won't break my heart to let it go.
Reply
#14
I know this is not the best post to make this question, so sorry, but..

will it be posible to use opengl in a gtk gui? (GtkGLExt)

thanks.
Reply
#15
im on pdf ;)
Reply
#16
Is ode.org working for everyone else? I was going to try my hand at it, but the site won't even come up. :???:
Reply
#17
Yeah, the ODE site seems to be offline for days, dunno.

I finished translating the glGTK headers, here's a screenie of the button demo, ported from C:

[Image: glgtk_button.gif]

Now there are a dozen different ways to use OpenGL: GLUT, SDL, GLFW, Gtk, Wgl, and the GFXlib ;)
Reply
#18
That's only half a dozen. Tongue

BTW, the Allegro headers can't be ported with SWIG because all of the prototypes are declared using a preprocessor macro which SWIG doesn't translate. I'm probably going to split the Allegro header into headers corresponding to the C headers anyway to help in finding missing parts and inconsistencies.

EDIT: also, when trying to port a Gtk example, I get this error message:

Quote:C:\fb\FreeBASIC\examples\Gtk>..\..\fbc_new scribble-simple.bas
(9) : error 42: Variable not declared, found: 'ifndef'

#ifndef __pango_font_bi__
^

There's nothing before the (9). I get the same message when trying to compile button_test, glade-xml, menu_test, and opengl_button.
Reply
#19
@Vic

here is another GLADE sample, nothing fancy though.
I used your new gtk include files, and the basic file derived from the glade-xml.bas example.

Here the basic file:
Code:
option explicit

#include "gtk/gtk.bi"
#include "gtk/libglade/glade-xml.bi"

' include files for windows commands have to be
' placed after the gtk bi's
' otherwise it will not compile
#include "win/user32.bi"

#ifndef NULL
#define NULL 0
#endif

''
'' call-backs
''
declare sub on_window1_destroy cdecl alias "on_window1_destroy" (byval object as GtkObject ptr, byval user_data as gpointer )
declare sub on_button1_clicked cdecl alias "on_button1_clicked" (byval object as GtkObject ptr, byval user_data as gpointer )

dim xml as GladeXML ptr
dim toplevel as GtkWidget ptr

gtk_init( NULL, NULL )

xml = glade_xml_new( "glade_gui.glade", NULL, NULL )


toplevel = glade_xml_get_widget( xml, "window" )
gtk_widget_show_all( toplevel )
glade_xml_signal_autoconnect( xml )
gtk_main( )

g_object_unref( xml )


end 0


'':::::
sub on_window1_destroy cdecl (byval object as GtkObject ptr, byval user_data as gpointer ) export
    Messagebox(0,"QUIT","MESSAGE",0)
    gtk_main_quit () 'this is needed, otherwise the process is not destroyed by the os...
end sub

'':::::
sub on_button1_clicked cdecl (byval object as GtkObject ptr, byval user_data as gpointer ) export
    Messagebox(0,"I'm here...","HELLO",0)
end sub

And here is the XML file (filename = glade_gui.glade):
Code:
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">

<glade-interface>

<widget class="GtkWindow" id="window">
  <property name="visible">True</property>
  <property name="title" translatable="yes">Preferences</property>
  <property name="type">GTK_WINDOW_TOPLEVEL</property>
  <property name="window_position">GTK_WIN_POS_NONE</property>
  <property name="modal">False</property>
  <property name="resizable">True</property>
  <property name="destroy_with_parent">False</property>
  <signal name="delete_event" handler="on_window1_destroy"/>

  <child>
    <widget class="GtkVBox" id="AllDaGoodies">
      <property name="border_width">6</property>
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child>
    <widget class="GtkNotebook" id="Preferences">
      <property name="visible">True</property>
      <property name="can_focus">True</property>
      <property name="show_tabs">True</property>
      <property name="show_border">True</property>
      <property name="tab_pos">GTK_POS_TOP</property>
      <property name="scrollable">False</property>
      <property name="enable_popup">False</property>

      <child>
        <widget class="GtkVBox" id="LocationOptions">
          <property name="border_width">6</property>
          <property name="visible">True</property>
          <property name="homogeneous">False</property>
          <property name="spacing">0</property>

          <child>
        <widget class="GtkRadioButton" id="Here">
          <property name="visible">True</property>
          <property name="can_focus">True</property>
          <property name="label" translatable="yes">_Here</property>
          <property name="use_underline">True</property>
          <property name="relief">GTK_RELIEF_NORMAL</property>
          <property name="active">False</property>
          <property name="inconsistent">False</property>
          <property name="draw_indicator">True</property>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
          </child>

          <child>
        <widget class="GtkRadioButton" id="There">
          <property name="visible">True</property>
          <property name="can_focus">True</property>
          <property name="label" translatable="yes">_There</property>
          <property name="use_underline">True</property>
          <property name="relief">GTK_RELIEF_NORMAL</property>
          <property name="active">False</property>
          <property name="inconsistent">False</property>
          <property name="draw_indicator">True</property>
          <property name="group">Here</property>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
          </child>
          <child>
        <widget class="GtkButton" id="HelloButton">
          <property name="visible">True</property>
          <property name="can_default">True</property>
          <property name="can_focus">True</property>
          <property name="label">Hello</property>
          <property name="use_stock">True</property>
          <property name="relief">GTK_RELIEF_NORMAL</property>
                  <signal name="clicked" handler="on_button1_clicked"/>
        </widget>
          </child>

        </widget>
        <packing>
          <property name="tab_expand">False</property>
          <property name="tab_fill">True</property>
        </packing>
      </child>

      <child>
        <widget class="GtkLabel" id="LocationLabel">
          <property name="visible">True</property>
          <property name="label" translatable="yes">Location</property>
          <property name="use_underline">False</property>
          <property name="use_markup">False</property>
          <property name="justify">GTK_JUSTIFY_LEFT</property>
          <property name="wrap">False</property>
          <property name="selectable">False</property>
          <property name="xalign">0.5</property>
          <property name="yalign">0.5</property>
          <property name="xpad">0</property>
          <property name="ypad">0</property>
        </widget>
        <packing>
          <property name="type">tab</property>
        </packing>
      </child>

      <child>
        <widget class="GtkColorSelection" id="ColorSelection">
          <property name="border_width">6</property>
          <property name="visible">True</property>
          <property name="has_opacity_control">True</property>
          <property name="has_palette">False</property>
        </widget>
        <packing>
          <property name="tab_expand">False</property>
          <property name="tab_fill">True</property>
        </packing>
      </child>

      <child>
        <widget class="GtkLabel" id="ColorLabel">
          <property name="visible">True</property>
          <property name="label" translatable="yes">Color</property>
          <property name="use_underline">False</property>
          <property name="use_markup">False</property>
          <property name="justify">GTK_JUSTIFY_LEFT</property>
          <property name="wrap">False</property>
          <property name="selectable">False</property>
          <property name="xalign">0.5</property>
          <property name="yalign">0.5</property>
          <property name="xpad">0</property>
          <property name="ypad">0</property>
        </widget>
        <packing>
          <property name="type">tab</property>
        </packing>
      </child>

      <child>
        <widget class="GtkFontSelection" id="FontSelection">
          <property name="border_width">6</property>
          <property name="visible">True</property>
          <property name="preview_text" translatable="yes">abcdefghijk ABCDEFGHIJK</property>
        </widget>
        <packing>
          <property name="tab_expand">False</property>
          <property name="tab_fill">True</property>
        </packing>
      </child>

      <child>
        <widget class="GtkLabel" id="FontLabel">
          <property name="visible">True</property>
          <property name="label" translatable="yes">Font</property>
          <property name="use_underline">False</property>
          <property name="use_markup">False</property>
          <property name="justify">GTK_JUSTIFY_LEFT</property>
          <property name="wrap">False</property>
          <property name="selectable">False</property>
          <property name="xalign">0.5</property>
          <property name="yalign">0.5</property>
          <property name="xpad">0</property>
          <property name="ypad">0</property>
        </widget>
        <packing>
          <property name="type">tab</property>
        </packing>
      </child>

      <child>
        <widget class="GtkScrolledWindow" id="scrolledwindow1">
          <property name="visible">True</property>
          <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
          <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
          <property name="shadow_type">GTK_SHADOW_IN</property>
          <property name="window_placement">GTK_CORNER_TOP_LEFT</property>

          <child>
            <widget class="GtkTextView" id="text1">
              <property name="visible">True</property>
              <property name="can_focus">True</property>
              <property name="editable">True</property>
              <property name="justification">GTK_JUSTIFY_LEFT</property>
              <property name="wrap_mode">GTK_WRAP_WORD</property>
              <property name="cursor_visible">True</property>
              <property name="pixels_above_lines">0</property>
              <property name="pixels_below_lines">0</property>
              <property name="pixels_inside_wrap">0</property>
              <property name="left_margin">0</property>
              <property name="right_margin">0</property>
              <property name="indent">0</property>
              <property name="text" translatable="yes"></property>
            </widget>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">True</property>
          <property name="fill">True</property>
        </packing>
      </child>

      <child>
        <widget class="GtkLabel" id="EditLabel">
          <property name="visible">True</property>
          <property name="label" translatable="yes">Edit</property>
          <property name="use_underline">False</property>
          <property name="use_markup">False</property>
          <property name="justify">GTK_JUSTIFY_LEFT</property>
          <property name="wrap">False</property>
          <property name="selectable">False</property>
          <property name="xalign">0.5</property>
          <property name="yalign">0.5</property>
          <property name="xpad">0</property>
          <property name="ypad">0</property>
        </widget>
        <packing>
          <property name="type">tab</property>
        </packing>
      </child>


    </widget>
    <packing>
      <property name="padding">0</property>
      <property name="expand">True</property>
      <property name="fill">True</property>
    </packing>
      </child>

      <child>
    <widget class="GtkVBox" id="TheGlobalButtonArea">
      <property name="visible">True</property>
      <property name="homogeneous">False</property>
      <property name="spacing">0</property>

      <child>
        <widget class="GtkHSeparator" id="hseparator1">
          <property name="visible">True</property>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>

      <child>
        <widget class="GtkHButtonBox" id="hbuttonbox2">
          <property name="visible">True</property>
          <property name="layout_style">GTK_BUTTONBOX_END</property>
          <property name="spacing">0</property>

          <child>
        <widget class="GtkButton" id="QuitButton">
          <property name="visible">True</property>
          <property name="can_default">True</property>
          <property name="can_focus">True</property>
          <property name="label">gtk-quit</property>
          <property name="use_stock">True</property>
          <property name="relief">GTK_RELIEF_NORMAL</property>
                  <signal name="clicked" handler="on_window1_destroy"/>
        </widget>
          </child>
        </widget>
        <packing>
          <property name="padding">0</property>
          <property name="expand">False</property>
          <property name="fill">False</property>
        </packing>
      </child>
    </widget>
    <packing>
      <property name="padding">0</property>
      <property name="expand">False</property>
      <property name="fill">False</property>
    </packing>
      </child>
    </widget>
  </child>
</widget>

</glade-interface>

BTW: you did an amasing job translating all the bi files 8)
Reply
#20
Here's the ode link...

http://q12.org/ode

Wink
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)