From a16b8a5474c45f91bc821beb3b8eea1e00867085 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Wed, 19 Oct 2011 23:08:15 -0500 Subject: [PATCH] sweet editor using GAL, links but does not work --- new/CMakeLists.txt | 82 +++- new/sweet_edit.cpp | 227 +++++++++ new/sweet_editor_panel.cpp | 76 +++ new/sweet_editor_panel.fbp | 938 +++++++++++++++++++++++++++++++++++++ new/sweet_editor_panel.h | 67 +++ 5 files changed, 1386 insertions(+), 4 deletions(-) create mode 100644 new/sweet_edit.cpp create mode 100644 new/sweet_editor_panel.cpp create mode 100644 new/sweet_editor_panel.fbp create mode 100644 new/sweet_editor_panel.h diff --git a/new/CMakeLists.txt b/new/CMakeLists.txt index 06c4019e34..7d5c1d912c 100644 --- a/new/CMakeLists.txt +++ b/new/CMakeLists.txt @@ -1,13 +1,38 @@ -set( STAND_ALONE true ) +# This program source code file is part of KICAD, a free EDA CAD application. +# +# Copyright (C) 2011 SoftPLC Corporation, Dick Hollenbeck +# Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors#. +# +# 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 the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you may find one here: +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +# or you may search the http://www.gnu.org website for the version 2 license, +# or you may write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +# + +# for now, this is a stand alone project +if( 1 ) -if( STAND_ALONE ) project(kicad-new) cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) set( PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../ ) + # message( "PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}" ) + # Path to local CMake modules. set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules ) @@ -24,8 +49,24 @@ if( STAND_ALONE ) check_find_package_result( wxWidgets_FOUND "wxWidgets" ) + find_library( gal_LIBRARY "libgal.a" + PATHS + "${CMAKE_CURRENT_SOURCE_DIR}/../../kicad-gal/build" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../kicad-gal/build" + DOC + "Where is the static GAL library" + ) + + find_path( gal_ROOT NAMES "README.txt" + PATHS + "${CMAKE_CURRENT_SOURCE_DIR}/../../kicad-gal" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../kicad-gal" + DOC + "Where is the base include directory for the GAL library" + ) + # make config.h - include(PerformFeatureChecks) + include( PerformFeatureChecks ) perform_feature_checks() # Include wxWidgets macros. @@ -49,7 +90,6 @@ if( STAND_ALONE ) endif() - #================================================ # Doxygen Output #================================================ @@ -129,6 +169,40 @@ endif() target_link_libraries( test_sch_lib_table sweet ) +include_directories ("${gal_ROOT}/gal/cairo") +include_directories( "${gal_ROOT}/gal/common" ) +include_directories ("${gal_ROOT}/gal/font") +include_directories ("${gal_ROOT}/gal/opengl") +include_directories ("${gal_ROOT}/math") + +# Find pkg-config in order find cairo. +find_package( PkgConfig REQUIRED ) + +# Find cairo. +pkg_search_module( CAIRO REQUIRED cairo>=1.8.1 ) +include_directories( ${CAIRO_INCLUDE_DIRS} ) + +# Find the OpenGL libraries (gl and glu) +find_package( OpenGL ) + +# Find GLEW +pkg_search_module( GLEW REQUIRED glew>=1.5.0 ) +include_directories( ${GLEW_INCLUDE_DIRS} ) + + +include_directories( ${gal_ROOT} ) + +add_executable( sweet_edit sweet_edit.cpp sweet_editor_panel.cpp ) + +target_link_libraries( sweet_edit + ${OPENGL_LIBRARIES} + ${gal_LIBRARY} + ${wxWidgets_LIBRARIES} + ${GLEW_LIBRARIES} + ${GDI_PLUS_LIBRARIES} + ) + + #================================================================= # if you want a Python scripting layer on top for unit testing or driving. # reference: http://www.swig.org/Doc1.3/Introduction.html#Introduction_build_system diff --git a/new/sweet_edit.cpp b/new/sweet_edit.cpp new file mode 100644 index 0000000000..194e69d6c7 --- /dev/null +++ b/new/sweet_edit.cpp @@ -0,0 +1,227 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2011 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2011 Kicad Developers, see change_log.txt for contributors. + * + * 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 the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// wxWidgets imports +#include +#include +#include +#include +#include +#include + +// Graphics Abstraction Layer imports +#include +#include +#include +#include +#include +#include +#include "gal/font/newstroke_font.h" + +#include +#include + +#include "sweet_editor_panel.h" + +#define screenSizeX 640 +#define screenSizeY 480 + + + +/** + * Class SWEET_EDIT + * implements an editor for SWEET, including support for inheritance and + * LIB_TABLE configuration. + */ +class SWEET_FRAME: public wxFrame +{ +public: + // @brief Constructor + SWEET_FRAME( wxWindow* parent, wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size ); + + // @brief Destructor + ~SWEET_FRAME(); + +private: + bool m_isReady; + bool m_isPanning; + + GRAPHICS_ABSTRACTION_LAYER* m_gal; + + wxSize m_screenSize; + VECTOR2D m_worldSize; + + /* + double m_alpha; + + VECTOR2D m_startMousePoint; + VECTOR2D m_startLookAtPoint; + MATRIX3x3D m_startMatrix; + + STROKE_FONT m_font; + */ + + // Event handlers + /* + void OnTimerEvent( wxTimerEvent &event ); + void OnMotion( wxMouseEvent& event ); + void OnMouseWheel( wxMouseEvent& event ); + void OnRedraw( wxCommandEvent& event ); + void OnRightDown( wxMouseEvent& event ); + void OnRightUp( wxMouseEvent& event ); + */ +}; + + +SWEET_FRAME::SWEET_FRAME( wxWindow* parent, wxWindowID id, const wxString& title, + const wxPoint& pos, const wxSize& size ) : + wxFrame( parent, id, title, pos, size ), + m_screenSize( size.x, size.y ) +{ + new SWEET_EDITOR_PANEL( this, wxID_ANY, wxPoint( 0, 0 ), wxSize( -1, -1 ), 0 ); + + // Connect( wxEVT_TIMER, wxTimerEventHandler( SWEET_FRAME::OnTimerEvent ) ); + + /* + Connect( EVT_GAL_REDRAW, wxCommandEventHandler( SWEET_FRAME::OnRedraw ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( SWEET_FRAME::OnMotion ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( SWEET_FRAME::OnMouseWheel ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( SWEET_FRAME::OnRightDown ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( SWEET_FRAME::OnRightUp ) ); +*/ + +/* + // Set the world unit length + m_gal->SetWorldUnitLength( 0.01 ); + m_gal->SetScreenDPI( 100 ); + m_gal->SetLookAtPoint( VECTOR2D( size.x / 2, size.y / 2 ) ); + m_gal->ComputeWorldScreenMatrix(); + + // Compute the world size + m_worldSize = VECTOR2D( m_screenSize.x, m_screenSize.y ); + + // Load Font + if( !m_font.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ) ) + { + cout << "Loading of the font failed." << endl; + } + + m_font.SetGraphicsAbstractionLayer( m_gal ); +*/ + +} + + +SWEET_FRAME::~SWEET_FRAME() +{ + delete m_gal; +} + + + + // void PaintScene(); + + +static const wxCmdLineEntryDesc g_cmdLineDesc[] = { + { + wxCMD_LINE_PARAM, + NULL, + NULL, + +#if wxCHECK_VERSION( 2, 9, 0 ) + "filename of libtable", +#else + wxT( "filename of libtable" ), +#endif + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE + }, + { wxCMD_LINE_NONE } +}; + + +class GAL_TEST_APPLICATION: public wxApp +{ +public: + GAL_TEST_APPLICATION(); + +private: + virtual bool OnInit(); + virtual int OnExit(); + virtual int OnRun(); + virtual void OnInitCmdLine( wxCmdLineParser& aParser ); + virtual bool OnCmdLineParsed( wxCmdLineParser& aParser ); +}; + + +GAL_TEST_APPLICATION::GAL_TEST_APPLICATION() +{ +} + + +bool GAL_TEST_APPLICATION::OnInit() +{ + if ( !wxApp::OnInit() ) + return false; + + SWEET_FRAME* frame = new SWEET_FRAME( (wxFrame *) NULL, + -1, wxT( "SWEET Editor" ), + wxPoint( screenSizeX + 10, 0 ), + wxSize( screenSizeX, screenSizeY ) ); + + frame->Show( true ); + + return true; +} + + +int GAL_TEST_APPLICATION::OnExit() +{ + return 0; +} + + +int GAL_TEST_APPLICATION::OnRun() +{ + int exitcode = wxApp::OnRun(); + return exitcode; +} + + +void GAL_TEST_APPLICATION::OnInitCmdLine( wxCmdLineParser& parser ) +{ + parser.SetDesc( g_cmdLineDesc ); + parser.SetSwitchChars( wxT( "-" ) ); +} + + +bool GAL_TEST_APPLICATION::OnCmdLineParsed( wxCmdLineParser& parser ) +{ + return true; +} + + +DECLARE_APP( GAL_TEST_APPLICATION ) + +IMPLEMENT_APP( GAL_TEST_APPLICATION ) diff --git a/new/sweet_editor_panel.cpp b/new/sweet_editor_panel.cpp new file mode 100644 index 0000000000..86cfced17e --- /dev/null +++ b/new/sweet_editor_panel.cpp @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2011) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "sweet_editor_panel.h" + +/////////////////////////////////////////////////////////////////////////// + +SWEET_EDITOR_PANEL::SWEET_EDITOR_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +{ + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxVERTICAL ); + + m_top_bottom = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D ); + m_top_bottom->SetSashGravity( 1 ); + m_top_bottom->Connect( wxEVT_IDLE, wxIdleEventHandler( SWEET_EDITOR_PANEL::m_top_bottomOnIdle ), NULL, this ); + + m_panel9 = new wxPanel( m_top_bottom, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxVERTICAL ); + + m_splitter3 = new wxSplitterWindow( m_panel9, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D ); + m_splitter3->Connect( wxEVT_IDLE, wxIdleEventHandler( SWEET_EDITOR_PANEL::m_splitter3OnIdle ), NULL, this ); + + m_scrolledTextWindow = new wxScrolledWindow( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledTextWindow->SetScrollRate( 5, 5 ); + wxStaticBoxSizer* m_scrolledTextSizer; + m_scrolledTextSizer = new wxStaticBoxSizer( new wxStaticBox( m_scrolledTextWindow, wxID_ANY, _("Sweet") ), wxVERTICAL ); + + m_sweet_scroll_window = new wxTextCtrl( m_scrolledTextWindow, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxALWAYS_SHOW_SB ); + m_scrolledTextSizer->Add( m_sweet_scroll_window, 1, wxALL|wxEXPAND, 5 ); + + m_scrolledTextWindow->SetSizer( m_scrolledTextSizer ); + m_scrolledTextWindow->Layout(); + m_scrolledTextSizer->Fit( m_scrolledTextWindow ); + m_gal_scrolled_window = new wxScrolledWindow( m_splitter3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_gal_scrolled_window->SetScrollRate( 5, 5 ); + wxStaticBoxSizer* m_gal_sizer; + m_gal_sizer = new wxStaticBoxSizer( new wxStaticBox( m_gal_scrolled_window, wxID_ANY, _("Visual Part") ), wxVERTICAL ); + + m_gal = new OPENGL_GAL( m_gal_scrolled_window, size ); + m_gal_sizer->Add( m_gal, 0, wxALL, 5 ); + + m_gal_scrolled_window->SetSizer( m_gal_sizer ); + m_gal_scrolled_window->Layout(); + m_gal_sizer->Fit( m_gal_scrolled_window ); + m_splitter3->SplitVertically( m_scrolledTextWindow, m_gal_scrolled_window, 0 ); + bSizer10->Add( m_splitter3, 1, wxEXPAND, 5 ); + + m_panel9->SetSizer( bSizer10 ); + m_panel9->Layout(); + bSizer10->Fit( m_panel9 ); + m_scrolledWindow3 = new wxScrolledWindow( m_top_bottom, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow3->SetScrollRate( 5, 5 ); + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_scrolledWindow3, wxID_ANY, _("Parsing Errors") ), wxVERTICAL ); + + m_htmlWin2 = new wxHtmlWindow( m_scrolledWindow3, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); + sbSizer1->Add( m_htmlWin2, 1, wxALL|wxEXPAND, 5 ); + + m_scrolledWindow3->SetSizer( sbSizer1 ); + m_scrolledWindow3->Layout(); + sbSizer1->Fit( m_scrolledWindow3 ); + m_top_bottom->SplitHorizontally( m_panel9, m_scrolledWindow3, 0 ); + bSizer2->Add( m_top_bottom, 1, wxEXPAND, 5 ); + + this->SetSizer( bSizer2 ); + this->Layout(); +} + +SWEET_EDITOR_PANEL::~SWEET_EDITOR_PANEL() +{ +} diff --git a/new/sweet_editor_panel.fbp b/new/sweet_editor_panel.fbp new file mode 100644 index 0000000000..899e0e26ee --- /dev/null +++ b/new/sweet_editor_panel.fbp @@ -0,0 +1,938 @@ + + + + + + C++ + 1 + source_name + 0 + res + UTF-8 + connect + sweet_editor_panel + 1000 + none + 1 + MyProject1 + + . + + 1 + 1 + 0 + 0 + + 1 + 1 + 1 + 1 + 0 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + impl_virtual + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + SWEET_EDITOR_PANEL + 1 + + + 1 + + + Resizable + + 1 + 500,300 + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer2 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + m_top_bottom + 1 + + + protected + 1 + + + Resizable + + 1 + 0 + -1 + 1 + + wxSPLIT_HORIZONTAL + wxSP_3D + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_panel9 + 1 + + + protected + 1 + + + Resizable + + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer10 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + m_splitter3 + 1 + + + protected + 1 + + + Resizable + + 0.0 + 0 + -1 + 1 + + wxSPLIT_VERTICAL + wxSP_3D + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_scrolledTextWindow + 1 + + + protected + 1 + + + Resizable + + 5 + 5 + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY + Sweet + + m_scrolledTextSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + 0 + + 1 + m_sweet_scroll_window + 1 + + + protected + 1 + + + Resizable + + 1 + + wxTE_MULTILINE + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + wxALWAYS_SHOW_SB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_gal_scrolled_window + 1 + + + protected + 1 + + + Resizable + + 5 + 5 + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY + Visual Part + + m_gal_sizer + wxVERTICAL + none + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + OPENGL_GAL + 1 + m_gal = new OPENGL_GAL( m_gal_scrolled_window, size ); + + 1 + OPENGL_GAL* m_gal; + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + #include <opengl_gal.h> + + + 0 + + + 0 + + 1 + m_gal + 1 + + + protected + 1 + + + Resizable + + + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_scrolledWindow3 + 1 + + + protected + 1 + + + Resizable + + 5 + 5 + 1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + wxHSCROLL|wxVSCROLL + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY + Parsing Errors + + sbSizer1 + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + m_htmlWin2 + 1 + + + protected + 1 + + + Resizable + + 1 + + wxHW_SCROLLBAR_AUTO + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/new/sweet_editor_panel.h b/new/sweet_editor_panel.h new file mode 100644 index 0000000000..4c98756b77 --- /dev/null +++ b/new/sweet_editor_panel.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Jun 6 2011) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __sweet_editor_panel__ +#define __sweet_editor_panel__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class SWEET_EDITOR_PANEL +/////////////////////////////////////////////////////////////////////////////// +class SWEET_EDITOR_PANEL : public wxPanel +{ + private: + + protected: + wxSplitterWindow* m_top_bottom; + wxPanel* m_panel9; + wxSplitterWindow* m_splitter3; + wxScrolledWindow* m_scrolledTextWindow; + wxTextCtrl* m_sweet_scroll_window; + wxScrolledWindow* m_gal_scrolled_window; + OPENGL_GAL* m_gal; + wxScrolledWindow* m_scrolledWindow3; + wxHtmlWindow* m_htmlWin2; + + public: + + SWEET_EDITOR_PANEL( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL ); + ~SWEET_EDITOR_PANEL(); + + void m_top_bottomOnIdle( wxIdleEvent& ) + { + m_top_bottom->SetSashPosition( 0 ); + m_top_bottom->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SWEET_EDITOR_PANEL::m_top_bottomOnIdle ), NULL, this ); + } + + void m_splitter3OnIdle( wxIdleEvent& ) + { + m_splitter3->SetSashPosition( 0 ); + m_splitter3->Disconnect( wxEVT_IDLE, wxIdleEventHandler( SWEET_EDITOR_PANEL::m_splitter3OnIdle ), NULL, this ); + } + +}; + +#endif //__sweet_editor_panel__