Added Aleksandras' framelayout code, with more or less working Linux Makefiles
General makefiles to be added later. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
1
utils/framelayout/samples/demo/Makefile
Normal file
1
utils/framelayout/samples/demo/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
include ../../../../setup/general/makedirs
|
27
utils/framelayout/samples/demo/Makefile.in
Normal file
27
utils/framelayout/samples/demo/Makefile.in
Normal file
@@ -0,0 +1,27 @@
|
||||
# WXXT base directory
|
||||
WXBASEDIR=@WXBASEDIR@
|
||||
|
||||
# set the OS type for compilation
|
||||
OS=@OS@
|
||||
# compile a binary only
|
||||
RULE=bin
|
||||
|
||||
# define executable name
|
||||
BIN_TARGET=fl_demo
|
||||
|
||||
# define library sources
|
||||
BIN_CPP_SRC=\
|
||||
fl_demo.cpp\
|
||||
|
||||
#define library objects
|
||||
BIN_OBJ=\
|
||||
$(BIN_CPP_SRC:.cpp=.o)
|
||||
|
||||
# additional things needed to link
|
||||
BIN_LINK=-lwx_fl_gtk
|
||||
|
||||
# additional things needed to compile
|
||||
ADD_COMPILE=-I../../../src
|
||||
|
||||
# include the definitions now
|
||||
include ../../../../../template.mak
|
1196
utils/framelayout/samples/demo/fl_demo.cpp
Normal file
1196
utils/framelayout/samples/demo/fl_demo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
142
utils/framelayout/samples/demo/fl_demo.h
Normal file
142
utils/framelayout/samples/demo/fl_demo.h
Normal file
@@ -0,0 +1,142 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: No names yet.
|
||||
// Purpose: Contrib. demo
|
||||
// Author: Aleksandras Gluchovas
|
||||
// Modified by:
|
||||
// Created: 04/11/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Aleksandras Gluchovas
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __FLDEMO_G__
|
||||
#define __FLDEMO_G__
|
||||
|
||||
// ID for the menu commands
|
||||
|
||||
#define MINIMAL_QUIT 1
|
||||
#define MINIMAL_ABOUT 102
|
||||
|
||||
#define ID_LOAD 103
|
||||
#define ID_STORE 104
|
||||
#define ID_AUTOSAVE 105
|
||||
#define ID_SETTINGS 106
|
||||
#define ID_REMOVE 107
|
||||
#define ID_REMOVEALL 108
|
||||
#define ID_RECREATE 109
|
||||
#define ID_ACTIVATE 110
|
||||
#define ID_FIRST 111
|
||||
#define ID_SECOND 112
|
||||
#define ID_THIRD 113
|
||||
|
||||
#define ID_SAY_ITSOK 114
|
||||
#define ID_BTN_YES 115
|
||||
#define ID_BTN_NO 116
|
||||
#define ID_BTN_ESC 117
|
||||
|
||||
#define MAX_LAYOUTS 3
|
||||
|
||||
#define FIRST_LAYOUT 0
|
||||
#define SECOND_LAYOUT 1
|
||||
#define THIRD_LAYOUT 2
|
||||
|
||||
class wxFrameLayout;
|
||||
class wxObjectStorage;
|
||||
|
||||
// FOR NOW::
|
||||
typedef wxPanel MyTestPanel;
|
||||
|
||||
// Define a new application type
|
||||
|
||||
class MyApp: public wxApp
|
||||
{
|
||||
public:
|
||||
bool OnInit(void);
|
||||
};
|
||||
|
||||
// Define a new frame type
|
||||
|
||||
class MyFrame: public wxFrame
|
||||
{
|
||||
protected:
|
||||
|
||||
wxFrameLayout* mLayouts[MAX_LAYOUTS];
|
||||
|
||||
wxFrameLayout* mpNestedLayout;
|
||||
wxFrameLayout* mpAboutBoxLayout;
|
||||
|
||||
int mActiveLayoutNo;
|
||||
bool mAutoSave;
|
||||
bool mSavedAlready;
|
||||
|
||||
// container windows:
|
||||
|
||||
wxTextCtrl* mpClntWindow;
|
||||
wxPanel* mpInternalFrm;
|
||||
|
||||
wxImageList mImageList;
|
||||
|
||||
wxFrame mAboutBox;
|
||||
|
||||
// helpers for control-creation
|
||||
|
||||
wxTextCtrl* CreateTxtCtrl ( const wxString& txt = "wxTextCtrl", wxWindow* parent = NULL );
|
||||
wxTreeCtrl* CreateTreeCtrl( const wxString& label = "TreeCtrl" );
|
||||
wxChoice* CreateChoice ( const wxString& txt = "Choice1" );
|
||||
wxButton* CreateButton ( const wxString& label = "wxButton",
|
||||
wxWindow* pParent = NULL, long id = ID_SAY_ITSOK );
|
||||
|
||||
// helpers for layout-creation
|
||||
|
||||
void AddSearchToolbars( wxFrameLayout& layout, wxWindow* pParent );
|
||||
wxWindow* CreateDevLayout( wxFrameLayout& layout, wxWindow* pParent );
|
||||
|
||||
void DropInSomeBars( int layoutNo );
|
||||
void CreateLayout( int layoutNo );
|
||||
void RemoveLayout( int layoutNo );
|
||||
void DestroyEverything();
|
||||
|
||||
void InitAboutBox();
|
||||
|
||||
void ActivateLayout( int layoutNo );
|
||||
|
||||
void SerializeMe( wxObjectStorage& store );
|
||||
|
||||
public: /* public */
|
||||
|
||||
MyFrame(wxFrame *frame, char *title,
|
||||
int x, int y, int w, int h);
|
||||
|
||||
~MyFrame();
|
||||
|
||||
void SyncMenuBarItems();
|
||||
|
||||
// event handlers
|
||||
|
||||
bool OnClose(void);
|
||||
|
||||
void OnLoad( wxCommandEvent& event );
|
||||
void OnStore( wxCommandEvent& event );
|
||||
void OnAutoSave( wxCommandEvent& event );
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnSettings( wxCommandEvent& event );
|
||||
void OnRemove( wxCommandEvent& event );
|
||||
void OnRemoveAll( wxCommandEvent& event );
|
||||
void OnRecreate( wxCommandEvent& event );
|
||||
void OnFirst( wxCommandEvent& event );
|
||||
void OnSecond( wxCommandEvent& event );
|
||||
void OnThird( wxCommandEvent& event );
|
||||
|
||||
void OnSayItsOk( wxCommandEvent& event );
|
||||
void OnBtnYes( wxCommandEvent& event );
|
||||
void OnBtnNo( wxCommandEvent& event );
|
||||
void OnBtnEsc( wxCommandEvent& event );
|
||||
|
||||
void OnChar( wxKeyEvent& event );
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user