Changeset 15

Show
Ignore:
Timestamp:
08/05/08 00:59:54 (2 years ago)
Author:
callum.linden
Message:

Updates before new site released. Minor changes to LLMozLib and some new bookmarks for uBrowser.
Reviewed by cricket ball

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/llmozlib2/llembeddedbrowser.cpp

    r8 r15  
    4545#endif  // WIN32 
    4646 
     47#include <iostream> 
     48 
    4749#include "llembeddedbrowser.h" 
    4850#include "llembeddedbrowserwindow.h" 
     
    6163#include "nsXULAppAPI.h" 
    6264#include "nsIAppShell.h" 
    63  
    64 #if defined(LL_LINUX) || defined(LL_DARWIN) 
     65#include "nsIPromptService.h" 
     66#include "time.h" 
    6567#include "nsWidgetsCID.h" 
     68#include "nsNetCID.h" 
     69 
    6670static nsIAppShell *sAppShell = nsnull; 
    67 #endif // defined(LL_LINUX) || defined(LL_DARWIN) 
    6871 
    6972// singleton pattern - initialization 
     
    206209        enableProxy( false, "", 0 ); 
    207210 
    208 #if defined(LL_LINUX) || defined(LL_DARWIN) 
    209         // Essential on Linux/GTK to add the gecko pump to the GTK event 
    210         // loop.  Might be harmless/good on other platforms too. 
     211    // Originally from Linux version but seems to help other platforms too 
    211212        nsresult rv; 
    212213        nsCOMPtr<nsIAppShell> appShell; 
     
    222223        sAppShell->Create(0, nsnull); 
    223224        sAppShell->Spinup(); 
    224 #endif // LL_LINUX 
    225225 
    226226        clearLastError(); 
     
    399399}; 
    400400 
     401 
    401402//////////////////////////////////////////////////////////////////////////////// 
    402403// 
     
    421422        }; 
    422423 
     424 
    423425        browserWindowIn->SetWebBrowser( nsnull ); 
    424426 
  • trunk/llmozlib2/llembeddedbrowserwindow.cpp

    r8 r15  
    595595                return PR_FALSE; 
    596596 
     597 
    597598        // get pres context 
    598599        nsCOMPtr< nsPresContext > presContext; 
     
    868869        if ( mWebNav ) 
    869870                mWebNav->GoForward(); 
     871}; 
     872 
     873//////////////////////////////////////////////////////////////////////////////// 
     874// 
     875void LLEmbeddedBrowserWindow::navigateReload() 
     876{ 
     877        // maybe need a cache version of this too? 
     878        if ( mWebNav ) 
     879                mWebNav->Reload( nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE ); 
    870880}; 
    871881 
  • trunk/llmozlib2/llembeddedbrowserwindow.h

    r8 r15  
    195195                PRBool canNavigateForward(); 
    196196                void navigateForward(); 
     197                void navigateReload(); 
    197198 
    198199                // javascript access/control 
  • trunk/llmozlib2/llmozlib2.cpp

    r9 r15  
    374374} 
    375375 
     376//////////////////////////////////////////////////////////////////////////////// 
     377// 
     378bool LLMozLib::navigateReload( int browserWindowIdIn ) 
     379{ 
     380        LLEmbeddedBrowserWindow* browserWindow = getBrowserWindowFromWindowId( browserWindowIdIn ); 
     381        if ( browserWindow ) 
     382        { 
     383                browserWindow->navigateReload(); 
     384 
     385                return true; 
     386        }; 
     387 
     388        return false; 
     389} 
     390 
    376391/////////////////////////////////////////////////////////////////////////////// 
    377392// 
  • trunk/llmozlib2/llmozlib2.h

    r9 r15  
    211211                bool canNavigateForward( int browserWindowIdIn ); 
    212212                bool navigateForward( int browserWindowIdIn ); 
     213                bool navigateReload( int browserWindowIdIn ); 
    213214 
    214215                // javascript access/control 
  • trunk/llmozlib2/tests/dependencies/include/glui.h

    r1 r15  
    11/**************************************************************************** 
    22 
    3   GLUI User Interface Toolkit (LGPL) 
    4   ---------------------------------- 
    5  
    6      glui.h - Main (and only) external header for 
     3  GLUI User Interface Toolkit 
     4  --------------------------- 
     5 
     6     glui.h - Main (and only) external header for  
    77        GLUI User Interface Toolkit 
    88 
     
    1414  Forums: http://sourceforge.net/forum/?group_id=92496 
    1515 
    16   This library is free software; you can redistribute it and/or 
    17   modify it under the terms of the GNU Lesser General Public 
    18   License as published by the Free Software Foundation; either 
    19   version 2.1 of the License, or (at your option) any later version. 
    20  
    21   This library is distributed in the hope that it will be useful, 
    22   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    23   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    24   Lesser General Public License for more details. 
    25  
    26   You should have received a copy of the GNU Lesser General Public 
    27   License along with this library; if not, write to the Free Software 
    28   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
     16  This software is provided 'as-is', without any express or implied  
     17  warranty. In no event will the authors be held liable for any damages  
     18  arising from the use of this software.  
     19 
     20  Permission is granted to anyone to use this software for any purpose,  
     21  including commercial applications, and to alter it and redistribute it  
     22  freely, subject to the following restrictions:  
     23 
     24  1. The origin of this software must not be misrepresented; you must not  
     25  claim that you wrote the original software. If you use this software  
     26  in a product, an acknowledgment in the product documentation would be  
     27  appreciated but is not required.  
     28  2. Altered source versions must be plainly marked as such, and must not be  
     29  misrepresented as being the original software.  
     30  3. This notice may not be removed or altered from any source distribution.  
    2931 
    3032*****************************************************************************/ 
     
    3335#define GLUI_GLUI_H 
    3436 
     37// Having stdlib here first fixes some 'exit() redefined' errors on MSVC.NET 
     38// that come from old GLUT headers. 
     39#include <cstdlib> 
     40 
    3541#if defined(GLUI_FREEGLUT) 
    3642 
    3743  // FreeGLUT does not yet work perfectly with GLUI 
    3844  //  - use at your own risk. 
    39  
     45   
    4046  #include <GL/freeglut.h> 
    4147 
     
    4450  // OpenGLUT does not yet work properly with GLUI 
    4551  //  - use at your own risk. 
    46  
     52   
    4753  #include <GL/openglut.h> 
    4854 
    49 #else 
     55#else  
    5056 
    5157  #ifdef __APPLE__ 
     
    5763#endif 
    5864 
    59 #include <cstdlib> 
    6065#include <cstdio> 
    6166#include <cstring> 
     
    6368#include <vector> 
    6469 
    65 #define GLUI_VERSION 2.3f    /********** Current version **********/ 
    66  
     70/* GLUI API shared library export/import declarations. */ 
    6771#if defined(_WIN32) 
    68 #if !defined(GLUI_NO_LIB_PRAGMA) 
    69 #pragma comment(lib, "glui32.lib")  // Link automatically with GLUI library 
     72# ifdef GLUI_BUILDING_LIB 
     73#  ifdef GLUIDLL 
     74#   define GLUIAPI __declspec(dllexport) 
     75#  else 
     76#   define GLUIAPI 
     77#  endif 
     78# else 
     79#  ifdef GLUIDLL 
     80#   define GLUIAPI __declspec(dllimport) 
     81#  else 
     82#   define GLUIAPI 
     83#  endif 
     84# endif 
     85#else 
     86#define GLUIAPI 
    7087#endif 
     88 
     89 
     90#define GLUI_VERSION 2.36f    /********** Current version **********/ 
     91 
     92#if defined(_WIN32) 
     93#  if !defined(GLUI_NO_LIB_PRAGMA) && !defined(GLUI_BUILDING_LIB) 
     94// Link automatically with GLUI library 
     95#    if defined GLUIDLL  // define this when using glui dynamic library 
     96#      pragma comment(lib, "glui32dll.lib") 
     97#    else 
     98#      pragma comment(lib, "glui32.lib")   
     99#    endif 
     100#  endif 
    71101#endif 
    72102 
    73 /********** Do some basic defines *******/ 
    74  
    75 #ifndef Byte 
    76 #define Byte unsigned char 
    77 #endif 
    78  
    79 #ifndef _RGBC_ 
    80 class RGBc { 
    81 public: 
    82   Byte r, g, b; 
    83  
    84   void set(Byte r,Byte g,Byte b) {this->r=r;this->g=g;this->b=b;} 
    85  
    86   RGBc( void ) {} 
    87   RGBc( Byte r, Byte g, Byte b ) { set( r, g, b ); } 
    88 }; 
    89 #define _RGBC_ 
    90 #endif 
    91103 
    92104/********** List of GLUT callbacks ********/ 
    93105 
    94 enum GLUI_Glut_CB_Types 
    95 { 
     106enum GLUI_Glut_CB_Types  
     107{  
    96108    GLUI_GLUT_RESHAPE, 
    97109    GLUI_GLUT_KEYBOARD, 
     
    100112    GLUI_GLUT_MOTION, 
    101113    GLUI_GLUT_SPECIAL, 
    102     GLUI_GLUT_PASSIVE_MOTION, 
     114    GLUI_GLUT_PASSIVE_MOTION,   
    103115    GLUI_GLUT_ENTRY, 
    104     GLUI_GLUT_VISIBILITY 
     116    GLUI_GLUT_VISIBILITY   
    105117}; 
    106118 
     
    116128#define GLUI_SEPARATOR_HEIGHT           8 
    117129#define GLUI_DEFAULT_CONTROL_WIDTH    100 
    118 #define GLUI_DEFAULT_CONTROL_HEIGHT    13 
     130#define GLUI_DEFAULT_CONTROL_HEIGHT    13  
    119131#define GLUI_EDITTEXT_BOXINNERMARGINX   3 
    120132#define GLUI_EDITTEXT_HEIGHT           20 
     
    199211#define GLUI_TREEPANEL_HIERARCHY_NUMERICDOT  64 // display hierarchy in 1.3.2 (etc... ) format 
    200212#define GLUI_TREEPANEL_HIERARCHY_LEVEL_ONLY 128 // display hierarchy as only the level depth 
    201  
     213  
    202214/******************* GLUI Scrollbar Defaults - JVK ***************************/ 
    203215#define  GLUI_SCROLL_ARROW_WIDTH     16 
     
    215227 
    216228 
    217 /** Size of the character width hash table for faster lookups. 
     229/** Size of the character width hash table for faster lookups.  
    218230  Make sure to keep this a power of two to avoid the slow divide. 
    219231  This is also a speed/memory tradeoff; 128 is enough for low ASCII. 
     
    223235/**********  Translation codes  **********/ 
    224236 
    225 enum TranslationCodes 
     237enum TranslationCodes   
    226238{ 
    227239    GLUI_TRANSLATION_MOUSE_NONE = 0, 
     
    239251 
    240252typedef std::string GLUI_String; 
    241 GLUI_String& glui_format_str(GLUI_String &str, const char* fmt, ...); 
     253GLUIAPI GLUI_String& glui_format_str(GLUI_String &str, const char* fmt, ...); 
    242254 
    243255/********* Pre-declare classes as needed *********/ 
     
    287299/************************************************************/ 
    288300/** 
    289  Callback Adapter Class 
     301 Callback Adapter Class                             
    290302    Allows us to support different types of callbacks; 
    291303    like a GLUI_Update_CB function pointer--which takes an int; 
    292304    and a GLUI_Control_CB function pointer--which takes a GUI_Control object. 
    293305*/ 
    294 class GLUI_CB 
     306class GLUIAPI GLUI_CB 
    295307{ 
    296308public: 
     
    321333 Each GLUI_Node has a list of siblings (in a circular list) 
    322334 and a linked list of children. 
    323  
     335  
    324336 Everything onscreen is a GLUI_Node--windows, buttons, etc. 
    325337 The nodes are traversed for event processing, sizing, redraws, etc. 
    326338*/ 
    327 class GLUI_Node 
     339class GLUIAPI GLUI_Node  
    328340{ 
    329341    friend class GLUI_Tree;     /* JVK */ 
     
    371383/************************************************************/ 
    372384 
    373 enum GLUI_StdBitmaps_Codes 
     385enum GLUI_StdBitmaps_Codes  
    374386{ 
    375387    GLUI_STDBITMAP_CHECKBOX_OFF = 0, 
     
    408420 via the GLUI_StdBitmaps class. 
    409421*/ 
    410 class GLUI_Bitmap 
     422class GLUIAPI GLUI_Bitmap  
    411423{ 
    412424    friend class GLUI_StdBitmaps; 
     
    418430    /** Create bitmap from greyscale byte image */ 
    419431    void init_grey(unsigned char *array); 
    420  
     432     
    421433    /** Create bitmap from color int image */ 
    422434    void init(int *array); 
     
    436448 
    437449/** 
    438  Keeps an array of GLUI_Bitmap objects to represent all the 
     450 Keeps an array of GLUI_Bitmap objects to represent all the  
    439451 images used in the UI: checkboxes, arrows, etc. 
    440452*/ 
    441 class GLUI_StdBitmaps 
    442 { 
    443 public: 
    444     GLUI_StdBitmaps(); 
     453class GLUIAPI GLUI_StdBitmaps 
     454{ 
     455public: 
     456    GLUI_StdBitmaps();  
    445457    ~GLUI_StdBitmaps(); 
    446458 
     
    451463 
    452464    /** Draw the n'th standard bitmap (one of the enums 
    453        listed in GLUI_StdBitmaps_Codes) at pixel corner (x,y). 
     465       listed in GLUI_StdBitmaps_Codes) at pixel corner (x,y).  
    454466    */ 
    455467    void draw(int n, int x, int y) const; 
     
    469481 There's only one GLUI_Master_Object. 
    470482*/ 
    471 class GLUI_Master_Object 
     483class GLUIAPI GLUI_Master_Object  
    472484{ 
    473485 
    474486    friend void glui_idle_func(); 
    475  
     487   
    476488public: 
    477489 
     
    524536    void set_glutMenuStateFunc(Int1_CB f)              {glutMenuStateFunc(f);} 
    525537    void set_glutButtonBoxFunc(Int2_CB f)              {glutButtonBoxFunc(f);} 
    526     void set_glutDialsFunc(Int2_CB f)                      {glutDialsFunc(f);} 
    527  
    528  
    529     GLUI          *create_glui( const char *name, long flags=0, int x=-1, int y=-1 ); 
     538    void set_glutDialsFunc(Int2_CB f)                      {glutDialsFunc(f);}   
     539   
     540 
     541    GLUI          *create_glui( const char *name, long flags=0, int x=-1, int y=-1 );  
    530542    GLUI          *create_glui_subwindow( int parent_window, long flags=0 ); 
    531543    GLUI          *find_glui_by_window_id( int window_id ); 
     
    551563 This is the only GLUI_Master_Object in existence. 
    552564*/ 
    553 extern GLUI_Master_Object GLUI_Master; 
     565extern GLUIAPI GLUI_Master_Object GLUI_Master; 
    554566 
    555567/************************************************************/ 
     
    563575 to the callbacks in this class, for arbitrary use by external users. 
    564576 (see GLUI_Master_Object::set_glutKeyboardFunc). 
    565  
     577  
    566578 This entire approach seems to be superceded by the "subwindow" flavor 
    567579 of GLUI. 
    568580*/ 
    569 class GLUI_Glut_Window : public GLUI_Node 
     581class GLUIAPI GLUI_Glut_Window : public GLUI_Node  
    570582{ 
    571583public: 
     
    593605 
    594606/** 
    595   A GLUI_Main handles GLUT events for one window, routing them to the 
    596   appropriate controls.  The central user-visible "GLUI" class 
     607  A GLUI_Main handles GLUT events for one window, routing them to the  
     608  appropriate controls.  The central user-visible "GLUI" class  
    597609  inherits from this class; users should not allocate GLUT_Main objects. 
    598  
     610   
    599611  There's a separate GLUI_Main object for: 
    600612        - Each top-level window with GUI stuff in it. 
     
    605617  this class provides the window-level context for every control. 
    606618*/ 
    607 class GLUI_Main : public GLUI_Node 
     619class GLUIAPI GLUI_Main : public GLUI_Node  
    608620{ 
    609621    /********** Friend classes *************/ 
     
    649661    int           curr_cursor; 
    650662    int           w, h; 
    651     long          flags; 
     663    long          flags;  
    652664    bool          closing; 
    653665    int           parent_window; 
     
    695707    GLUI_StdBitmaps  std_bitmaps; 
    696708    GLUI_String      window_name; 
    697     RGBc             bkgd_color
     709    unsigned char    bkgd_color[3]
    698710    float            bkgd_color_f[3]; 
    699711 
     
    705717    void         align_controls( GLUI_Control *control ); 
    706718    void         deactivate_current_control( void ); 
    707  
     719     
    708720    /** Draw a 3D-look pushed-out box around this rectangle */ 
    709721    void         draw_raised_box( int x, int y, int w, int h ); 
    710722    /** Draw a 3D-look pushed-in box around this rectangle */ 
    711723    void         draw_lowered_box( int x, int y, int w, int h ); 
    712  
     724     
    713725    /** Return true if this control should redraw itself immediately (front buffer); 
    714726       Or queue up a redraw and return false if it shouldn't (back buffer). 
    715727    */ 
    716728    bool         should_redraw_now(GLUI_Control *ctl); 
    717  
    718     /** Switch to the appropriate draw buffer now.  Returns the old draw buffer. 
     729     
     730    /** Switch to the appropriate draw buffer now.  Returns the old draw buffer.  
    719731       This routine should probably only be called from inside the GLUI_DrawingSentinal, 
    720732       in glui_internal_control.h 
     
    723735    /** Go back to using this draw buffer.  Undoes set_current_draw_buffer. */ 
    724736    void         restore_draw_buffer( int buffer_state ); 
    725  
     737     
    726738    /** Pack, resize the window, and redraw all the controls. */ 
    727739    void         refresh(); 
    728  
     740     
    729741    /** Redraw the main graphics window */ 
    730742    void         post_update_main_gfx(); 
    731  
     743   
    732744    /** Recompute the sizes and positions of all controls */ 
    733745    void         pack_controls(); 
    734  
     746     
    735747    void         close_internal(); 
    736748    void         check_subwindow_position(); 
     
    751763 Most of the work of this class is in routing events, 
    752764 like keystrokes, mouseclicks, redraws, and sizing events. 
    753  
    754  Yes, this is a huge and hideous class.  It needs to be 
     765  
     766 Yes, this is a huge and hideous class.  It needs to be  
    755767 split up into simpler subobjects.  None of the data members 
    756768 should be directly accessed by users (they should be protected, 
    757769 not public); only subclasses. 
    758770*/ 
    759 class GLUI_Control : public GLUI_Node 
     771class GLUIAPI GLUI_Control : public GLUI_Node  
    760772{ 
    761773public: 
     
    766778    int             x_off, y_off_top, y_off_bot; /* INNER margins, by which child 
    767779                                                    controls are indented */ 
    768     int             contain_x, contain_y; 
     780    int             contain_x, contain_y;  
    769781    int             contain_w, contain_h; 
    770     /* if this is a container control (e.g., 
     782    /* if this is a container control (e.g.,  
    771783       radiogroup or panel) this indicated dimensions 
    772784       of inner area in which controls reside */ 
     
    777789    bool            can_activate; ///< If false, remove from tab order. 
    778790    bool            spacebar_mouse_click; ///< Spacebar simulates click. 
    779  
     791     
    780792/** Callbacks */ 
    781793    long            user_id;  ///< Integer to pass to callback function. 
     
    788800    int             float_array_size; 
    789801    GLUI_String     text;       /**< The text inside this control */ 
    790  
     802     
    791803/** "Live variable" updating */ 
    792804    void           *ptr_val;          /**< A pointer to the user's live variable value */ 
     
    794806    bool            live_inited; 
    795807    /* These variables store the last value that live variable was known to have. */ 
    796     int             last_live_int; 
     808    int             last_live_int;   
    797809    float           last_live_float; 
    798810    GLUI_String     last_live_text; 
    799811    float           last_live_float_array[GLUI_DEF_MAX_ARRAY]; 
    800  
    801 /** Properties of our control */ 
     812     
     813/** Properties of our control */     
    802814    GLUI           *glui;       /**< Our containing event handler (NEVER NULL during event processing!) */ 
    803815    bool            is_container;  /**< Is this a container class (e.g., panel) */ 
     
    835847    virtual int  mouse_over( int state, int x, int y ) { return false; } 
    836848 
    837     virtual void enable( void ); 
     849    virtual void enable( void );  
    838850    virtual void disable( void ); 
    839851    virtual void activate( int how )     { active = true; } 
     
    848860 
    849861    /** Redraw this control. 
    850        In single-buffering mode (drawing to GL_FRONT), this is just 
     862       In single-buffering mode (drawing to GL_FRONT), this is just  
    851863           a call to translate_and_draw_front (after a can_draw() check). 
    852        In double-buffering mode (drawing to GL_BACK), this queues up 
     864       In double-buffering mode (drawing to GL_BACK), this queues up  
    853865          a redraw and returns false, since you shouldn't draw yet. 
    854866    */ 
    855867    void          redraw(void); 
    856  
     868     
    857869    /** Redraw everybody in our window. */ 
    858870    void         redraw_window(void); 
     
    860872    virtual void align( void ); 
    861873    void         pack( int x, int y );    /* Recalculate positions and offsets */ 
    862     void         pack_old( int x, int y ); 
     874    void         pack_old( int x, int y );     
    863875    void         draw_recursive( int x, int y ); 
    864876    int          set_to_glut_window( void ); 
    865877    void         restore_window( int orig ); 
    866878    void         translate_and_draw_front( void ); 
    867     void         translate_to_origin( void ) 
     879    void         translate_to_origin( void )  
    868880    {glTranslatef((float)x_abs+.5,(float)y_abs+.5,0.0);} 
    869881    virtual void draw( int x, int y )=0; 
     
    871883    void        *get_font( void ); 
    872884    int          string_width( const char *text ); 
    873     int          string_width( const GLUI_String &str ) 
     885    int          string_width( const GLUI_String &str )  
    874886    { return string_width(str.c_str()); } 
    875887    int          char_width( char c ); 
    876888 
    877889    void         draw_name( int x, int y ); 
    878     void         draw_box_inwards_outline( int x_min, int x_max, 
     890    void         draw_box_inwards_outline( int x_min, int x_max,  
    879891                                           int y_min, int y_max ); 
    880892    void         draw_box( int x_min, int x_max, int y_min, int y_max, 
     
    883895    void         draw_emboss_box( int x_min, int x_max,int y_min,int y_max); 
    884896    void         draw_string( const char *text ); 
    885     void         draw_string( const GLUI_String &s ) 
     897    void         draw_string( const GLUI_String &s )  
    886898    { draw_string(s.c_str()); } 
    887899    void         draw_char( char c ); 
     
    897909    virtual void set_text( const char *t )   {} 
    898910    void         execute_callback( void ); 
    899     void         get_this_column_dims( int *col_x, int *col_y, 
    900                                        int *col_w, int *col_h, 
     911    void         get_this_column_dims( int *col_x, int *col_y,  
     912                                       int *col_w, int *col_h,  
    901913                                       int *col_x_off, int *col_y_off ); 
    902914    virtual bool needs_idle( void ) const; 
    903915    virtual bool wants_tabs() const      { return false; } 
    904916 
    905     GLUI_Control(void) 
     917    GLUI_Control(void)  
    906918    { 
    907919        x_off          = GLUI_XOFF; 
     
    950962/************************************************************/ 
    951963/** 
    952   An onscreen, clickable button--an outlined label that 
     964  An onscreen, clickable button--an outlined label that  
    953965  can be clicked.  When clicked, a button 
    954966  calls its GLUI_CB callback with its ID. 
    955967*/ 
    956 class GLUI_Button : public GLUI_Control 
     968class GLUIAPI GLUI_Button : public GLUI_Control 
    957969{ 
    958970public: 
     
    972984/** 
    973985 Create a new button. 
    974  
     986  
    975987  @param parent The panel our object is inside; or the main GLUI object. 
    976988  @param name The text inside the button. 
     
    978990  @param callback Optional callback function, taking either the int ID or control. 
    979991*/ 
    980     GLUI_Button( GLUI_Node *parent, const char *name, 
     992    GLUI_Button( GLUI_Node *parent, const char *name,  
    981993                 int id=-1, GLUI_CB cb=GLUI_CB() ); 
    982994    GLUI_Button( void ) { common_init(); }; 
     
    10031015 to an int value, which gets 1 for on and 0 for off. 
    10041016*/ 
    1005 class GLUI_Checkbox : public GLUI_Control 
     1017class GLUIAPI GLUI_Checkbox : public GLUI_Control 
    10061018{ 
    10071019public: 
     
    10251037/** 
    10261038 Create a new checkbox object. 
    1027  
     1039  
    10281040  @param parent The panel our object is inside; or the main GLUI object. 
    10291041  @param name Label next to our checkbox. 
    1030   @param value_ptr Optional integer value to attach to this checkbox.  When the 
     1042  @param value_ptr Optional integer value to attach to this checkbox.  When the  
    10311043     checkbox is checked or unchecked, *value_ptr will also be changed. ("Live Vars"). 
    10321044  @param id Optional ID number, to pass to the optional callback function. 
     
    10591071 from subsequent controls with a vertical bar. 
    10601072*/ 
    1061 class GLUI_Column : public GLUI_Control 
     1073class GLUIAPI GLUI_Column : public GLUI_Control 
    10621074{ 
    10631075public: 
     
    10671079 Create a new column, which separates the previous controls 
    10681080 from subsequent controls. 
    1069  
     1081  
    10701082  @param parent The panel our object is inside; or the main GLUI object. 
    10711083  @param draw_bar If true, draw a visible bar between new and old controls. 
     
    10931105 A GLUI_Panel contains a group of related controls. 
    10941106*/ 
    1095 class GLUI_Panel : public GLUI_Control 
     1107class GLUIAPI GLUI_Panel : public GLUI_Control 
    10961108{ 
    10971109public: 
     
    10991111/** 
    11001112 Create a new panel.  A panel groups together a set of related controls. 
    1101  
     1113  
    11021114  @param parent The outer panel our panel is inside; or the main GLUI object. 
    11031115  @param name The string name at the top of our panel. 
     
    11061118      GLUI_PANEL_NONE causes the panel's outline to be invisible. 
    11071119*/ 
    1108     GLUI_Panel( GLUI_Node *parent, const char *name, 
     1120    GLUI_Panel( GLUI_Node *parent, const char *name,  
    11091121                int type=GLUI_PANEL_EMBOSSED ); 
    11101122    GLUI_Panel() { common_init(); } 
     
    11221134        int_val      = GLUI_PANEL_EMBOSSED; 
    11231135        alignment    = GLUI_ALIGN_CENTER; 
    1124         is_container = true; 
     1136        is_container = true;  
    11251137        can_activate = false; 
    11261138        name=""; 
     
    11371149 A list of files the user can select from. 
    11381150*/ 
    1139 class GLUI_FileBrowser : public GLUI_Panel 
     1151class GLUIAPI GLUI_FileBrowser : public GLUI_Panel 
    11401152{ 
    11411153public: 
    11421154/** 
    11431155 Create a new list of files the user can select from. 
    1144  
     1156  
    11451157  @param parent The panel our object is inside; or the main GLUI object. 
    11461158  @param name Prompt to give to the user at the top of the file browser. 
     
    11511163  @param callback Optional callback function, taking either the int ID or control. 
    11521164*/ 
    1153     GLUI_FileBrowser( GLUI_Node *parent, 
     1165    GLUI_FileBrowser( GLUI_Node *parent,  
    11541166                      const char *name, 
    11551167                      int frame_type = GLUI_PANEL_EMBOSSED, 
     
    11691181 
    11701182protected: 
    1171     void common_init() 
     1183    void common_init()  
    11721184    { 
    11731185        w            = GLUI_DEFAULT_CONTROL_WIDTH; 
     
    11751187        int_val      = GLUI_PANEL_EMBOSSED; 
    11761188        alignment    = GLUI_ALIGN_CENTER; 
    1177         is_container = true; 
     1189        is_container = true;  
    11781190        can_activate = false; 
    11791191        allow_change_dir = true; 
     
    12011213 like a panel, but can be collapsed to just the name. 
    12021214*/ 
    1203 class GLUI_Rollout : public GLUI_Panel 
     1215class GLUIAPI GLUI_Rollout : public GLUI_Panel 
    12041216{ 
    12051217public: 
     
    12081220 Create a new rollout.  A rollout contains a set of controls, 
    12091221 like a panel, but can be collapsed to just the name. 
    1210  
     1222  
    12111223  @param parent The panel our object is inside; or the main GLUI object. 
    12121224  @param name String to show at the top of the rollout. 
     
    12171229      GLUI_PANEL_NONE causes the panel's outline to be invisible. 
    12181230*/ 
    1219     GLUI_Rollout( GLUI_Node *parent, const char *name, int open=true, 
     1231    GLUI_Rollout( GLUI_Node *parent, const char *name, int open=true,  
    12201232                  int type=GLUI_PANEL_EMBOSSED ); 
    12211233    GLUI_Rollout( void ) { common_init(); } 
    1222  
    1223  
     1234     
     1235     
    12241236    bool        currently_inside, initially_inside; 
    12251237    GLUI_Button  button; 
     
    12301242    int mouse_up_handler( int local_x, int local_y, bool inside ); 
    12311243    int  mouse_held_down_handler( int local_x, int local_y, bool inside ); 
    1232  
    1233     void  open( void ); 
     1244         
     1245    void  open( void );  
    12341246    void  close( void ); 
    12351247 
     
    12591271  One collapsible entry in a GLUI_TreePanel. 
    12601272*/ 
    1261 class GLUI_Tree : public GLUI_Panel 
    1262 { 
    1263 public: 
    1264     GLUI_Tree(GLUI_Node *parent, const char *name, 
     1273class GLUIAPI GLUI_Tree : public GLUI_Panel 
     1274{ 
     1275public: 
     1276    GLUI_Tree(GLUI_Node *parent, const char *name,  
    12651277              int open=false, int inset=0); 
    12661278 
     
    12841296    GLUI_Button  button; 
    12851297    GLUI_String  level_name; // level name, eg: 1.1.2, III, or 3 
    1286     GLUI_TreePanel *panel; 
     1298    GLUI_TreePanel *panel;  
    12871299 
    12881300    void draw( int x, int y ); 
     
    12921304    int  mouse_held_down_handler( int local_x, int local_y, bool inside ); 
    12931305    void set_column(GLUI_Column *c) { column = c; } 
    1294     void  open( void ); 
     1306    void  open( void );  
    12951307    void  close( void ); 
    12961308 
     
    13051317    int get_child_number() { return child_number; } 
    13061318    void enable_bar() { if (column) { column->int_val = 1;  set_color(red, green, blue); } } 
    1307     void disable_bar() { if (column) { column->int_val = 0;  } } 
    1308     void set_child_number(int c) { child_number = c; } 
    1309     void set_level_color(float r, float g, float b) { 
     1319    void disable_bar() { if (column) { column->int_val = 0;  } }  
     1320    void set_child_number(int c) { child_number = c; }  
     1321    void set_level_color(float r, float g, float b) {  
    13101322        lred = r; 
    13111323        lgreen = g; 
    13121324        lblue  = b; 
    13131325    } 
    1314     void set_color(float r, float g, float b) { 
     1326    void set_color(float r, float g, float b) {  
    13151327        red = r; 
    13161328        green = g; 
     
    13421354        level_name       = ""; 
    13431355        level            = 0; 
    1344  
     1356     
    13451357    }; 
    13461358}; 
     
    13561368  Manages, maintains, and formats a tree of GLUI_Tree objects. 
    13571369  These are shown in a heirarchical, collapsible display. 
    1358  
     1370   
    13591371  FIXME: There's an infinite loop in the traversal code (OSL 2006/06) 
    13601372*/ 
    1361 class GLUI_TreePanel : public GLUI_Panel 
     1373class GLUIAPI GLUI_TreePanel : public GLUI_Panel  
    13621374{ 
    13631375public: 
     
    13761388    int root_children; 
    13771389    /* These variables allow the tree panel to traverse the tree 
    1378        using only two function calls. (Well, four, if you count 
     1390       using only two function calls. (Well, four, if you count  
    13791391       going in reverse */ 
    13801392 
     
    13831395 
    13841396public: 
    1385     void            set_color(float r, float g, float b); 
     1397    void            set_color(float r, float g, float b);  
    13861398    void            set_level_color(float r, float g, float b); 
    13871399    void            set_format(int f) { format = f; } 
     
    14071419protected: 
    14081420    int uniqueID( void ) { next_id++; return next_id - 1; } 
    1409     void common_init() 
     1421    void common_init()  
    14101422    { 
    14111423        GLUI_Panel(); 
     
    14311443/** 
    14321444 The main user-visible interface object to GLUI. 
    1433  
    1434 */ 
    1435 class GLUI : public GLUI_Main 
     1445  
     1446*/ 
     1447class GLUIAPI GLUI : public GLUI_Main  
    14361448{ 
    14371449public: 
     
    14451457    void  add_separator_to_panel( GLUI_Panel *panel ); 
    14461458 
    1447     GLUI_RadioGroup 
     1459    GLUI_RadioGroup  
    14481460    *add_radiogroup( int *live_var=NULL, 
    14491461                     int user_id=-1,GLUI_CB callback=GLUI_CB()); 
    14501462 
    1451     GLUI_RadioGroup 
     1463    GLUI_RadioGroup  
    14521464    *add_radiogroup_to_panel(  GLUI_Panel *panel, 
    14531465                               int *live_var=NULL, 
     
    14681480                                          const char *name, float *live_var=NULL, 
    14691481                                          int id=-1, GLUI_CB callback=GLUI_CB()); 
    1470  
     1482   
    14711483    GLUI_Translation *add_translation( const char *name, 
    14721484                                       int trans_type, float *live_var=NULL, 
    14731485                                       int id=-1, GLUI_CB callback=GLUI_CB()    ); 
    1474     GLUI_Translation *add_translation_to_panel( 
    1475         GLUI_Panel *panel, const char *name, 
     1486    GLUI_Translation *add_translation_to_panel(  
     1487        GLUI_Panel *panel, const char *name,  
    14761488        int trans_type, float *live_var=NULL, 
    14771489        int id=-1, GLUI_CB callback=GLUI_CB()); 
    1478  
    1479     GLUI_Checkbox  *add_checkbox( const char *name, 
     1490   
     1491    GLUI_Checkbox  *add_checkbox( const char *name,  
    14801492                                  int *live_var=NULL, 
    14811493                                  int id=-1, GLUI_CB callback=GLUI_CB()); 
    1482     GLUI_Checkbox  *add_checkbox_to_panel( GLUI_Panel *panel, const char *name, 
    1483                                            int *live_var=NULL, int id=-1, 
     1494    GLUI_Checkbox  *add_checkbox_to_panel( GLUI_Panel *panel, const char *name,  
     1495                                           int *live_var=NULL, int id=-1,  
    14841496                                           GLUI_CB callback=GLUI_CB()); 
    14851497 
    1486     GLUI_Button  *add_button( const char *name, int id=-1, 
     1498    GLUI_Button  *add_button( const char *name, int id=-1,  
    14871499                              GLUI_CB callback=GLUI_CB()); 
    1488     GLUI_Button  *add_button_to_panel( GLUI_Panel *panel, const char *name, 
     1500    GLUI_Button  *add_button_to_panel( GLUI_Panel *panel, const char *name,  
    14891501                                       int id=-1, GLUI_CB callback=GLUI_CB() ); 
    14901502 
     
    14921504    GLUI_StaticText  *add_statictext_to_panel( GLUI_Panel *panel, const char *name ); 
    14931505 
    1494     GLUI_EditText  *add_edittext( const char *name, 
     1506    GLUI_EditText  *add_edittext( const char *name,  
    14951507                                  int data_type=GLUI_EDITTEXT_TEXT, 
    14961508                                  void*live_var=NULL, 
    14971509                                  int id=-1, GLUI_CB callback=GLUI_CB() ); 
    1498     GLUI_EditText  *add_edittext_to_panel( GLUI_Panel *panel, 
     1510    GLUI_EditText  *add_edittext_to_panel( GLUI_Panel *panel,  
    14991511                                           const char *name, 
    15001512                                           int data_type=GLUI_EDITTEXT_TEXT, 
    1501                                            void *live_var=NULL, int id=-1, 
     1513                                           void *live_var=NULL, int id=-1,  
    15021514                                           GLUI_CB callback=GLUI_CB() ); 
    1503     GLUI_EditText  *add_edittext( const char *name, GLUI_String& live_var, 
     1515    GLUI_EditText  *add_edittext( const char *name, GLUI_String& live_var,  
    15041516                                  int id=-1, GLUI_CB callback=GLUI_CB() ); 
    1505     GLUI_EditText  *add_edittext_to_panel( GLUI_Panel *panel, const char *name, 
     1517    GLUI_EditText  *add_edittext_to_panel( GLUI_Panel *panel, const char *name,  
    15061518                                           GLUI_String& live_var, int id=-1, 
    15071519                                           GLUI_CB callback=GLUI_CB() ); 
    15081520 
    1509     GLUI_Spinner  *add_spinner( const char *name, 
     1521    GLUI_Spinner  *add_spinner( const char *name,  
    15101522                                int data_type=GLUI_SPINNER_INT, 
    15111523                                void *live_var=NULL, 
    15121524                                int id=-1, GLUI_CB callback=GLUI_CB() ); 
    1513     GLUI_Spinner  *add_spinner_to_panel( GLUI_Panel *panel, 
     1525    GLUI_Spinner  *add_spinner_to_panel( GLUI_Panel *panel,  
    15141526                                         const char *name, 
    15151527                                         int data_type=GLUI_SPINNER_INT, 
     
    15191531 
    15201532    GLUI_Panel     *add_panel( const char *name, int type=GLUI_PANEL_EMBOSSED ); 
    1521     GLUI_Panel     *add_panel_to_panel( GLUI_Panel *panel, const char *name, 
     1533    GLUI_Panel     *add_panel_to_panel( GLUI_Panel *panel, const char *name,  
    15221534                                        int type=GLUI_PANEL_EMBOSSED ); 
    15231535 
     
    15251537    GLUI_Rollout   *add_rollout( const char *name, int open=true, 
    15261538                                 int type=GLUI_PANEL_EMBOSSED); 
    1527     GLUI_Rollout   *add_rollout_to_panel( GLUI_Panel *panel, const char *name, 
     1539    GLUI_Rollout   *add_rollout_to_panel( GLUI_Panel *panel, const char *name,  
    15281540                                          int open=true, 
    15291541                                          int type=GLUI_PANEL_EMBOSSED); 
     
    15771589/************************************************************/ 
    15781590 
    1579 class GLUI_EditText : public GLUI_Control 
     1591class GLUIAPI GLUI_EditText : public GLUI_Control 
    15801592{ 
    15811593public: 
     
    15871599    int                 text_x_offset; 
    15881600    int                 substring_start; /*substring that gets displayed in box*/ 
    1589     int                 substring_end; 
     1601    int                 substring_end;   
    15901602    int                 sel_start, sel_end;  /* current selection */ 
    15911603    int                 num_periods; 
     
    16461658                   int id=-1, GLUI_CB callback=GLUI_CB() ); 
    16471659    // Constructor, char* live variable 
    1648     GLUI_EditText( GLUI_Node *parent, const char *name, 
     1660    GLUI_EditText( GLUI_Node *parent, const char *name,  
    16491661                   char *live_var, 
    16501662                   int id=-1, GLUI_CB callback=GLUI_CB() ); 
    16511663    // Constructor, std::string live variable 
    1652     GLUI_EditText( GLUI_Node *parent, const char *name, 
     1664    GLUI_EditText( GLUI_Node *parent, const char *name,  
    16531665                   std::string &live_var, 
    16541666                   int id=-1, GLUI_CB callback=GLUI_CB() ); 
     
    16841696        draw_text_only        = false; 
    16851697    } 
    1686     void common_construct( GLUI_Node *parent, const char *name, 
     1698    void common_construct( GLUI_Node *parent, const char *name,  
    16871699                           int data_type, int live_type, void *live_var, 
    16881700                           int id, GLUI_CB callback ); 
     
    16951707/************************************************************/ 
    16961708 
    1697 class GLUI_CommandLine : public GLUI_EditText 
     1709class GLUIAPI GLUI_CommandLine : public GLUI_EditText 
    16981710{ 
    16991711public: 
     
    17011713 
    17021714    enum { HIST_SIZE = 100 }; 
     1715 
     1716    #ifdef _MSC_VER 
     1717    // Explicit template instantiation needed for dll 
     1718    template class GLUIAPI std::allocator<GLUI_String>; 
     1719    template class GLUIAPI std::vector<GLUI_String, std::allocator<GLUI_String> >; 
     1720    #endif 
     1721 
    17031722    std::vector<GLUI_String> hist_list; 
    17041723    int  curr_hist; 
     
    17371756        commit_flag = false; 
    17381757    } 
     1758 
    17391759}; 
    17401760 
     
    17451765/************************************************************/ 
    17461766 
    1747 class GLUI_RadioGroup : public GLUI_Control 
     1767class GLUIAPI GLUI_RadioGroup : public GLUI_Control 
    17481768{ 
    17491769public: 
     
    17521772    void draw( int x, int y ); 
    17531773    void set_name( const char *text ); 
    1754     void set_int_val( int int_val ); 
     1774    void set_int_val( int int_val );  
    17551775    void set_selected( int int_val ); 
    17561776 
     
    17821802/************************************************************/ 
    17831803 
    1784 class GLUI_RadioButton : public GLUI_Control 
     1804class GLUIAPI GLUI_RadioButton : public GLUI_Control 
    17851805{ 
    17861806public: 
     
    18231843/************************************************************/ 
    18241844 
    1825 class GLUI_Separator : public GLUI_Control 
     1845class GLUIAPI GLUI_Separator : public GLUI_Control 
    18261846{ 
    18271847public: 
     
    18551875/*                                                          */ 
    18561876/************************************************************/ 
    1857  
    1858 class GLUI_Spinner : public GLUI_Control 
     1877  
     1878class GLUIAPI GLUI_Spinner : public GLUI_Control 
    18591879{ 
    18601880public: 
    18611881    // Constructor, no live var 
    1862     GLUI_Spinner( GLUI_Node* parent, const char *name, 
     1882    GLUI_Spinner( GLUI_Node* parent, const char *name,  
    18631883                  int data_type=GLUI_SPINNER_INT, int id=-1, GLUI_CB callback=GLUI_CB() ); 
    18641884    // Constructor, int live var 
    1865     GLUI_Spinner( GLUI_Node* parent, const char *name, 
     1885    GLUI_Spinner( GLUI_Node* parent, const char *name,  
    18661886                  int *live_var, int id=-1, GLUI_CB callback=GLUI_CB() ); 
    18671887    // Constructor, float live var 
    1868     GLUI_Spinner( GLUI_Node* parent, const char *name, 
     1888    GLUI_Spinner( GLUI_Node* parent, const char *name,  
    18691889                  float *live_var, int id=-1, GLUI_CB callback=GLUI_CB() ); 
    18701890    // Deprecated constructor 
    1871     GLUI_Spinner( GLUI_Node* parent, const char *name, 
     1891    GLUI_Spinner( GLUI_Node* parent, const char *name,  
    18721892                  int data_type, 
    18731893                  void *live_var, 
     
    19381958        user_speed   = 1.0; 
    19391959    } 
    1940     void common_construct( GLUI_Node* parent, const char *name, 
     1960    void common_construct( GLUI_Node* parent, const char *name,  
    19411961                           int data_type, void *live_var, 
    19421962                           int id, GLUI_CB callback ); 
     
    19491969/************************************************************/ 
    19501970 
    1951 class GLUI_StaticText : public GLUI_Control 
     1971class GLUIAPI GLUI_StaticText : public GLUI_Control 
    19521972{ 
    19531973public: 
     
    19751995/************************************************************/ 
    19761996 
    1977 class GLUI_TextBox : public GLUI_Control 
     1997class GLUIAPI GLUI_TextBox : public GLUI_Control 
    19781998{ 
    19791999public: 
     
    19882008    int                 insertion_pt; 
    19892009    int                 substring_start; /*substring that gets displayed in box*/ 
    1990     int                 substring_end; 
     2010    int                 substring_end;   
    19912011    int                 sel_start, sel_end;  /* current selection */ 
    19922012    int                 last_insertion_pt; 
     
    20082028    int  key_handler( unsigned char key,int modifiers ); 
    20092029    int  special_handler( int key,int modifiers ); 
    2010  
     2030   
    20112031    void activate( int how ); 
    20122032    void deactivate( void ); 
     
    20682088    } 
    20692089    void common_construct( 
    2070         GLUI_Node *parent, GLUI_String *live_var, 
    2071         bool scroll, int id, GLUI_CB callback); 
     2090        GLUI_Node *parent, GLUI_String *live_var,  
     2091        bool scroll, int id, GLUI_CB callback);  
    20722092}; 
    20732093 
     
    20782098/************************************************************/ 
    20792099 
    2080 class GLUI_List_Item : public GLUI_Node 
     2100class GLUIAPI GLUI_List_Item : public GLUI_Node  
    20812101{ 
    20822102public: 
     
    20912111/************************************************************/ 
    20922112 
    2093 class GLUI_List : public GLUI_Control 
     2113class GLUIAPI GLUI_List : public GLUI_Control 
    20942114{ 
    20952115public: 
     
    20972117    GLUI_List( GLUI_Node *parent, bool scroll = false, 
    20982118               int id=-1, GLUI_CB callback=GLUI_CB() ); 
    2099                /*, GLUI_Control *object = NULL 
     2119               /*, GLUI_Control *object = NULL  
    21002120               ,GLUI_InterObject_CB obj_cb = NULL);*/ 
    21012121 
    21022122    GLUI_List( GLUI_Node *parent, 
    2103                GLUI_String& live_var, bool scroll = false, 
    2104                int id=-1, 
     2123               GLUI_String& live_var, bool scroll = false,  
     2124               int id=-1,  
    21052125               GLUI_CB callback=GLUI_CB() 
    21062126               /*,GLUI_Control *object = NULL */ 
     
    21282148    int  key_handler( unsigned char key,int modifiers ); 
    21292149    int  special_handler( int key,int modifiers ); 
    2130  
     2150   
    21312151    void activate( int how ); 
    21322152    void deactivate( void ); 
     
    21972217/*                                                          */ 
    21982218/************************************************************/ 
    2199  
    2200 class GLUI_Scrollbar : public GLUI_Control 
     2219  
     2220class GLUIAPI GLUI_Scrollbar : public GLUI_Control 
    22012221{ 
    22022222public: 
    22032223    // Constructor, no live var 
    22042224    GLUI_Scrollbar( GLUI_Node *parent, 
    2205                     const char *name, 
     2225                    const char *name,  
    22062226                    int horz_vert=GLUI_SCROLL_HORIZONTAL, 
    22072227                    int data_type=GLUI_SCROLL_INT, 
    2208                     int id=-1, GLUI_CB callback=GLUI_CB() 
     2228                    int id=-1, GLUI_CB callback=GLUI_CB()  
    22092229                    /*,GLUI_Control *object = NULL*/ 
    22102230                    /*,GLUI_InterObject_CB obj_cb = NULL*/ 
     
    22142234    GLUI_Scrollbar( GLUI_Node *parent, const char *name, int horz_vert, 
    22152235                    int *live_var, 
    2216                     int id=-1, GLUI_CB callback=GLUI_CB() 
     2236                    int id=-1, GLUI_CB callback=GLUI_CB()  
    22172237                    /*,GLUI_Control *object = NULL*/ 
    22182238                    /*,GLUI_InterObject_CB obj_cb = NULL*/ 
     
    22482268 
    22492269 
    2250     /* Rather than directly access an Editbox or Textbox for 
     2270    /* Rather than directly access an Editbox or Textbox for  
    22512271       changing variables, a pointer to some object is defined 
    22522272       along with a static callback in the form func(void *, int) - 
     
    22622282    int  key_handler( unsigned char key,int modifiers ); 
    22632283    int  special_handler( int key,int modifiers ); 
    2264  
     2284   
    22652285    void draw( int x, int y ); 
    22662286    void draw_pressed( void ); 
     
    22932313    void common_construct( 
    22942314        GLUI_Node *parent, 
    2295         const char *name, 
     2315        const char *name,  
    22962316        int horz_vert, 
    22972317        int data_type, void* live_var, 
     
    23112331/************************************************************/ 
    23122332 
    2313 class GLUI_Listbox_Item : public GLUI_Node 
     2333class GLUIAPI GLUI_Listbox_Item : public GLUI_Node  
    23142334{ 
    23152335public: 
     
    23182338}; 
    23192339 
    2320 class GLUI_Listbox : public GLUI_Control 
     2340class GLUIAPI GLUI_Listbox : public GLUI_Control 
    23212341{ 
    23222342public: 
     
    23522372    GLUI_Listbox_Item *get_item_ptr( const char *text ); 
    23532373    GLUI_Listbox_Item *get_item_ptr( int id ); 
    2354  
     2374   
    23552375 
    23562376    GLUI_Listbox( GLUI_Node *parent, 
     
    23882408  This is the superclass of translation and rotation widgets. 
    23892409*/ 
    2390 class GLUI_Mouse_Interaction : public GLUI_Control 
     2410class GLUIAPI GLUI_Mouse_Interaction : public GLUI_Control 
    23912411{ 
    23922412public: 
     
    24122432    virtual void iaction_dump( FILE *output )=0; 
    24132433    virtual void iaction_init( void ) = 0; 
    2414  
     2434   
    24152435    GLUI_Mouse_Interaction( void ) { 
    24162436        glui_format_str( name, "Mouse_Interaction: %p", this ); 
     
    24342454  a 3D rotation via a spaceball-like interface. 
    24352455*/ 
    2436 class GLUI_Rotation : public GLUI_Mouse_Interaction 
     2456class GLUIAPI GLUI_Rotation : public GLUI_Mouse_Interaction 
    24372457{ 
    24382458public: 
     
    24412461    bool           can_spin, spinning; 
    24422462    float          damping; 
    2443  
     2463   
    24442464    int  iaction_mouse_down_handler( int local_x, int local_y ); 
    24452465    int  iaction_mouse_up_handler( int local_x, int local_y, bool inside ); 
     
    24892509  a 3D translation. 
    24902510*/ 
    2491 class GLUI_Translation : public GLUI_Mouse_Interaction 
     2511class GLUIAPI GLUI_Translation : public GLUI_Mouse_Interaction 
    24922512{ 
    24932513public: 
     
    25132533    void setup_texture( void ); 
    25142534    void setup_lights( void ); 
    2515     void draw_2d_arrow( int radius, int filled, int orientation ); 
     2535    void draw_2d_arrow( int radius, int filled, int orientation );  
    25162536    void draw_2d_x_arrows( int radius ); 
    25172537    void draw_2d_y_arrows( int radius ); 
     
    25652585/* These are the callbacks that we pass to glut.  They take 
    25662586   some action if necessary, then (possibly) call the user-level 
    2567    glut callbacks. 
     2587   glut callbacks.   
    25682588*/ 
    25692589 
  • trunk/llmozlib2/tests/ubrowser/ubrowser.cpp

    r11 r15  
    8888        mIdNavHome( 0x0016 ), 
    8989        mIdNavForward( 0x0017 ), 
     90        mIdNavReload( 0x001b ), 
    9091        mIdBrowserSmall( 0x0018 ), 
    9192        mIdBrowserMedium( 0x0019 ), 
    9293        mIdBrowserLarge( 0x001a ), 
    93         mFocusUrlEdit( 0x001b ), 
    9494        mIdUpdateTypeRB( 0x0100 ), 
    9595        mIdUpdateTypeG( 0x0101 ), 
     
    149149        mBookmarks.push_back( std::pair< std::string, std::string >( "XUL Widgets", "http://www.hevanet.com/acorbin/xul/top.xul" ) ); 
    150150        mBookmarks.push_back( std::pair< std::string, std::string >( "Yahoo! User Interface Library slider", "http://developer.yahoo.com/yui/examples/slider/rgb2.html?mode=dist" ) ); 
    151         mBookmarks.push_back( std::pair< std::string, std::string >( "Shared HTML based Whiteboard", "http://donovanpreston.com:8080/draw/" ) ); 
    152151        mBookmarks.push_back( std::pair< std::string, std::string >( "Canvas Annimation Kit Experiment", "http://glimr.rubyforge.org/cake/canvas.html#DesignSketching" ) ); 
    153152        mBookmarks.push_back( std::pair< std::string, std::string >( "Skrbl shared whiteboard (non-flash)", "http://skrbl.com" ) ); 
     
    792791 
    793792        mTopGLUIWindow->add_column( false ); 
     793        GLUI_Button* mNavReloadButton = mTopGLUIWindow->add_button( "Reload", mIdNavReload, gluiCallbackWrapper ); 
     794        mNavReloadButton->set_w( 56 ); 
     795 
     796        mTopGLUIWindow->add_column( false ); 
    794797#ifdef LL_NEWER_GLUI 
    795798        mUrlEdit = mTopGLUIWindow->add_edittext( "Url:", GLUI_EDITTEXT_TEXT, mNavUrl, mIdUrlEdit, gluiCallbackWrapper ); 
     
    798801        mUrlEdit = mTopGLUIWindow->add_edittext( "Url:", mNavUrl, mIdUrlEdit, gluiCallbackWrapper ); 
    799802#endif // LL_NEWER_GLUI 
    800  
    801         mTopGLUIWindow->add_column( false ); 
    802         mTopGLUIWindow->add_button( "Focus", mFocusUrlEdit, gluiCallbackWrapper ); 
    803803 
    804804        mTopGLUIWindow->set_main_gfx_window( mAppWindow ); 
     
    956956                        // this seems better than sending focus on mouse down (still need to improve this) 
    957957                        LLMozLib::getInstance()->focusBrowser( mCurWindowId, true ); 
    958  
    959                         // turn off the URL edit widget so it's "obvious" that you need to press focus to reenable it. 
    960                         // (focus restriction in GLUI i wasn't able to work around) 
    961                         mUrlEdit->disable(); 
    962958                }; 
    963959        } 
     
    11131109        } 
    11141110        else 
     1111        if ( controlIdIn == mIdNavReload ) 
     1112        { 
     1113                LLMozLib::getInstance()->navigateReload( mCurWindowId ); 
     1114        } 
     1115        else 
    11151116        if ( controlIdIn == mIdUrlEdit ) 
    11161117        { 
     
    11211122        { 
    11221123                LLMozLib::getInstance()->navigateTo( mCurWindowId, mBookmarks[ mSelBookmark ].second.c_str() ); 
    1123         } 
    1124         else 
    1125         // silly hack needed to get around a limitation of GLUI (or myunderstanding of it). 
    1126         // I really need a callback when caret enters the edit field so I can do this automatically 
    1127         if ( controlIdIn == mFocusUrlEdit ) 
    1128         { 
    1129                 mUrlEdit->enable(); 
    1130                 LLMozLib::getInstance()->focusBrowser( mCurWindowId, false ); 
    1131                 setFocusNativeWindow(); 
    11321124        } 
    11331125        else 
  • trunk/llmozlib2/tests/ubrowser/ubrowser.h

    r9 r15  
    151151                const int mIdNavHome; 
    152152                const int mIdNavForward; 
     153                const int mIdNavReload; 
    153154                const int mIdBrowserSmall; 
    154155                const int mIdBrowserMedium; 
    155156                const int mIdBrowserLarge; 
    156                 const int mFocusUrlEdit; 
    157157                const int mIdFace0; 
    158158                const int mIdFace1;