| 1 |
//cxx . . $ `<file>/src/main.cpp`/ |
| 2 |
// qutemol on wxWidgets MAIN |
| 3 |
// |
| 4 |
// (on DevCpp, download and install "wxWidgets 2.6.1 unicode" DevPak) |
| 5 |
// |
| 6 |
//////////////////////////////////////////////////////////////////// |
| 7 |
|
| 8 |
#define SnapButtoncxx . . $ `src/main.cpp:8:9`! 1 |
| 9 |
#define OpenButtoncxx . . $ `src/main.cpp:9:9`! 2 |
| 10 |
#define QuitButtoncxx . . $ `src/main.cpp:10:9`! 3 |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
#include <GL/glew.h> |
| 15 |
|
| 16 |
|
| 17 |
#ifdef __GNUG__cxx . . $ `<built-in>:12:9`! |
| 18 |
#pragma implementation |
| 19 |
#pragma interface |
| 20 |
#endif |
| 21 |
|
| 22 |
// For compilers that support precompilation, includes "wx.h". |
| 23 |
#include "wx/wxprec.h" |
| 24 |
|
| 25 |
#include "wx/image.h" |
| 26 |
#include "wx/stdpaths.h" |
| 27 |
|
| 28 |
//#include <iostream> |
| 29 |
#include <wx/cmdline.h> |
| 30 |
#include <wx/statline.h> |
| 31 |
|
| 32 |
#ifdef __BORLANDC__ |
| 33 |
#pragma hdrstop |
| 34 |
#endif |
| 35 |
|
| 36 |
#ifndef WX_PRECOMP |
| 37 |
#include "wx/wx.h" |
| 38 |
#endif |
| 39 |
|
| 40 |
#if !wxUSE_GLCANVAScxx . . $ `<external>/11560256600324905329/setup.h:557:9`! |
| 41 |
#error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library" |
| 42 |
#endif |
| 43 |
|
| 44 |
#include "main.h"cxx . . $ `<file>/src/main.h`/ |
| 45 |
#ifdef __WXMAC__ |
| 46 |
# ifdef __DARWIN__ |
| 47 |
# include <OpenGL/glu.h> |
| 48 |
# else |
| 49 |
# include <glu.h> |
| 50 |
# endif |
| 51 |
#else |
| 52 |
# include <GL/glu.h> |
| 53 |
#endif |
| 54 |
|
| •55 |
#include "sample.xpm"cxx . . $ `<file>/src/sample.xpm`/ |
| 56 |
|
| 57 |
typedef unsigned char Bytecxx . . $ Byte#; |
| 58 |
typedef unsigned int uintcxx . . $ uint#; |
| 59 |
|
| 60 |
#include "CgUtil.h"cxx . . $ `<file>/src/CgUtil.h`/ |
| 61 |
|
| 62 |
#include <math.h> |
| 63 |
|
| 64 |
#include <vector> |
| 65 |
|
| 66 |
#include <vcg/space/point3.h>cxx . . $ `<file>/vcg/vcg/space/point3.h`/ |
| 67 |
#include <vcg/space/color4.h>cxx . . $ `<file>/vcg/vcg/space/color4.h`/ |
| 68 |
|
| 69 |
#include "gen_normal.h"cxx . . $ `<file>/src/gen_normal.h`/ |
| 70 |
#include <wrap/gui/trackball.h>cxx . . $ `<file>/vcg/wrap/gui/trackball.h`/ |
| 71 |
|
| 72 |
using namespace vcg; |
| 73 |
using namespace std; |
| 74 |
|
| 75 |
#include "CubeMapSamp.h"cxx . . $ `<file>/src/CubeMapSamp.h`/ |
| 76 |
#include "OctaMapSamp.h"cxx . . $ `<file>/src/OctaMapSamp.h`/ |
| 77 |
#include "Mol.h"cxx . . $ `<file>/src/Mol.h`/ |
| 78 |
//#include "AOgpu.h" |
| 79 |
|
| 80 |
#include "MyCanvas.h"cxx . . $ `<file>/src/MyCanvas.h`/ |
| 81 |
|
| 82 |
#include "ShadowMap.h"cxx . . $ `<file>/src/ShadowMap.h`/ |
| 83 |
#include "HardSettings.h"cxx . . $ `<file>/src/HardSettings.h`/ |
| 84 |
|
| 85 |
#include "Common.h"cxx . . $ `<file>/src/Common.h`/ |
| 86 |
|
| 87 |
#include "MyTab.h"cxx . . $ `<file>/src/MyTab.h`/ |
| 88 |
|
| 89 |
#include "saveSnapDialog.h"cxx . . $ `<file>/src/saveSnapDialog.h`/ |
| 90 |
|
| 91 |
#include "progress.h"cxx . . $ `<file>/src/progress.h`/ |
| 92 |
|
| 93 |
#include "AtomColor.h"cxx . . $ `<file>/src/AtomColor.h`/ |
| 94 |
|
| 95 |
extern vcgcxx . . $ vcg/::Trackballcxx . . $ vcg/Trackball# trackcxx . . $ track.; |
| 96 |
extern vcgcxx . . $ vcg/::Trackballcxx . . $ vcg/Trackball# lightTrackcxx . . $ lightTrack.; |
| 97 |
|
| 98 |
extern Molcxx . . $ Mol# molcxx . . $ mol.; |
| 99 |
|
| 100 |
bool mustDoHQcxx . . $ mustDoHQ.=false; |
| 101 |
|
| 102 |
#include <wx/dnd.h> |
| 103 |
#include <wx/notebook.h> |
| 104 |
|
| 105 |
wxStopWatchcxx . . $ wxStopWatch# swcxx . . $ sw.; |
| 106 |
|
| 107 |
|
| 108 |
#include "gifSave.h"cxx . . $ `<file>/src/gifSave.h`/ |
| 109 |
|
| 110 |
// defined in pngSave |
| 111 |
bool PNGSaveWithAlphacxx . . $ PNGSaveWithAlpha(f0ecdd44617aa11b).( const char * filename, const Bytecxx . . $ Byte# * data, int sx, int sy, int reverse = 0); |
| 112 |
void downsample2x2cxx . . $ downsample2x2(49a5bbab55ea8abc).(Bytecxx . . $ Byte# * data, int sx, int sy); |
| 113 |
void downsample2x2NoAlphacxx . . $ downsample2x2NoAlpha(49a5bbab55ea8abc).(Bytecxx . . $ Byte# * data, int sx, int sy); |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
wxBitmapcxx . . $ wxBitmap# *LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(wxStringcxx . . $ wxString# st){ |
| •118 |
#ifndef _WIN32 |
| 119 |
wxStringcxx . . $ wxString# basePath = wxStandardPathscxx . . $ wxStandardPaths#::Getcxx . . $ wxStandardPathsBase#Get(26dbef459f22cfe7).().GetResourcesDircxx . . $ wxStandardPathsBase#GetResourcesDir(fd613287981dc2d5).(); |
| 120 |
wxBitmapcxx . . $ wxBitmap#* res=new wxBitmapcxx . . $ wxBitmap#wxBitmap(424bfb788bbc81f4).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(PKGDATADIRcxx . . $ `<built-in>:481:9`!"/image/")+cxx . . $ operator+(b9d4cd82031bb246).st+cxx . . $ operator+(707d0521c75ba302)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(".png"),wxBITMAP_TYPE_PNGcxx . . $ wxBITMAP_TYPE_PNG.); |
| 121 |
#else |
| 122 |
wxBitmap* res=new wxBitmap(_T("image/")+st+_T(".png"),wxBITMAP_TYPE_PNG); |
| 123 |
#endif |
| 124 |
//wxBitmap* res=new wxBitmap(st,wxBITMAP_TYPE_PNG_RESOURCE); |
| 125 |
|
| 126 |
// Marke all black pixels as transparent (useful for Windows NT only) |
| 127 |
//res->SetMask(new wxMask(*res, wxColor(0,0,0))); |
| 128 |
|
| 129 |
return res; |
| 130 |
} |
| 131 |
|
| 132 |
void MyTabcxx . . $ MyTab#::SceneChangedcxx . . $ MyTab#SceneChanged(49f6e7a06ebc5aa8).(){ |
| 133 |
((TestGLCanvascxx . . $ TestGLCanvas#*)frame2redrawcxx . . $ MyTab#frame2redraw.)->SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
void TestGLCanvascxx . . $ TestGLCanvas#::SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(){ |
| 138 |
mustDoHQcxx . . $ mustDoHQ.=false; |
| 139 |
Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(false); |
| 140 |
} |
| 141 |
|
| 142 |
void StartTimecxx . . $ StartTime(49f6e7a06ebc5aa8).(){ |
| 143 |
swcxx . . $ sw..Startcxx . . $ wxStopWatch#Start(1624ee8275b10bda).(); |
| 144 |
} |
| 145 |
|
| 146 |
long int TakeTimecxx . . $ TakeTime(239003bd6de320c1).(FILEcxx . . $ FILE# *f , char *st){ |
| 147 |
long int delta=swcxx . . $ sw..Timecxx . . $ wxStopWatch#Time(57a65ae535d7db84).(); |
| 148 |
fprintf(f,"%5ldmsec: %s\n",delta,st); |
| 149 |
//globaltime=timen; |
| 150 |
return delta; |
| 151 |
} |
| 152 |
/*long int TakeTotalTime(){ |
| 153 |
long int timen=getTicks(), delta=timen-startingtime; |
| 154 |
printf("------------------\nTotal time: %5dmsec\n",delta); |
| 155 |
globaltime=timen; |
| 156 |
return delta; |
| 157 |
}*/ |
| 158 |
|
| 159 |
|
| 160 |
long int getTickscxx . . $ getTicks(da6335ded91d79c2).(){ |
| 161 |
return 0; |
| 162 |
} |
| 163 |
|
| 164 |
void MyToolbarcxx . . $ MyToolbar#::SetTitleTextcxx . . $ MyToolbar#SetTitleText(867e7b693acc3d1f).(wxStringcxx . . $ wxString# s){ |
| •165 |
#ifdef _WIN32 |
| 166 |
titleText->SetLabel(s); |
| 167 |
titleTextSizer->Layout(); |
| 168 |
#endif |
| 169 |
} |
| 170 |
|
| 171 |
class MyDropTargetcxx . . $ MyDropTarget# : public wxFileDropTargetcxx . . $ wxFileDropTarget# |
| 172 |
{ |
| 173 |
public: |
| 174 |
MyDropTargetcxx . . $ MyDropTarget#MyDropTarget(69b616a6a8d6ca2).(MyFramecxx . . $ MyFrame# *_parent) { parentcxx . . $ MyDropTarget#parent. = _parent; } |
| 175 |
|
| 176 |
virtual bool OnDropFilescxx . . $ MyDropTarget#OnDropFiles(e7f2d9c7e889bd0).(wxCoordcxx . . $ wxCoord# x, wxCoordcxx . . $ wxCoord# y, const wxArrayStringcxx . . $ wxArrayString#& filenames){ |
| 177 |
parentcxx . . $ MyDropTarget#parent.->OnReadFilecxx . . $ MyFrame#OnReadFile(867e7b693acc3d1f).(filenamescxx . . $ wxString#wxString(eec3608749d303b4).[cxx . . $ wxArrayString#`operator[]`(e716c8688aa8e16d).0]); |
| 178 |
}; |
| 179 |
|
| 180 |
private: |
| 181 |
MyFramecxx . . $ MyFrame# *parentcxx . . $ MyDropTarget#parent.; |
| 182 |
}; |
| 183 |
|
| 184 |
void MyToolbarcxx . . $ MyToolbar#::OnDragcxx . . $ MyToolbar#OnDrag(7e6a1c70b0e99497).(wxMouseEventcxx . . $ wxMouseEvent# &event){ |
| 185 |
|
| 186 |
if ( event.LeftDClickcxx . . $ wxMouseEvent#LeftDClick(50ce9a9e25b4a850).()) { |
| 187 |
parentcxx . . $ MyToolbar#parent.->Maximizecxx . . $ wxTopLevelWindowGTK#Maximize(b45ddcbc8423892c).( !(parentcxx . . $ MyToolbar#parent.->IsMaximizedcxx . . $ wxTopLevelWindowGTK#IsMaximized(50ce9a9e25b4a850).()) ); |
| 188 |
} |
| 189 |
|
| 190 |
static int omx, omy; |
| 191 |
int mx, my; |
| 192 |
mx = event.GetXcxx . . $ wxMouseState#GetX(455f465bc33b4cdf).(); |
| 193 |
my = event.GetYcxx . . $ wxMouseState#GetY(455f465bc33b4cdf).(); |
| 194 |
|
| 195 |
if ( event.Draggingcxx . . $ wxMouseEvent#Dragging(50ce9a9e25b4a850).() ){ |
| 196 |
if (!(parentcxx . . $ MyToolbar#parent.->IsMaximizedcxx . . $ wxTopLevelWindowGTK#IsMaximized(50ce9a9e25b4a850).())) { |
| 197 |
CaptureMousecxx . . $ wxWindowBase#CaptureMouse(49f6e7a06ebc5aa8).(); |
| 198 |
wxPointcxx . . $ wxPoint# cur=parentcxx . . $ MyToolbar#parent.->GetPositioncxx . . $ wxWindowBase#GetPosition(c5a050f918c1b405).(); |
| 199 |
int dx=mx-omx; |
| 200 |
int dy=my-omy; |
| 201 |
cur.xcxx . . $ wxPoint#x.+=dx; |
| 202 |
cur.ycxx . . $ wxPoint#y.+=dy; |
| 203 |
omx=mx-dx; |
| 204 |
omy=my-dy; |
| 205 |
parentcxx . . $ MyToolbar#parent.->SetPositioncxx . . $ wxWindowBase#SetPosition(87c93ffae058e4a2).( cur ); |
| 206 |
} |
| 207 |
} else { |
| 208 |
omx=mx; omy=my; |
| 209 |
ReleaseMousecxx . . $ wxWindowBase#ReleaseMouse(49f6e7a06ebc5aa8).(); |
| 210 |
} |
| 211 |
} |
| 212 |
|
| 213 |
wxNotebookcxx . . $ wxNotebook# *notebookcxx . . $ notebook.; |
| 214 |
|
| 215 |
void MyToolbarcxx . . $ MyToolbar#::UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(49f6e7a06ebc5aa8).(){ |
| 216 |
UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).( molcxx . . $ mol..DoingAOcxx . . $ Mol#DoingAO(c9857a73d68e59ba).() ); |
| 217 |
} |
| 218 |
|
| 219 |
void MyToolbarcxx . . $ MyToolbar#::UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).(bool b){ |
| 220 |
if (gearPresentcxx . . $ MyToolbar#gearPresent.==b) return; |
| 221 |
if (!b) gearScxx . . $ MyToolbar#gearS.->Detachcxx . . $ wxSizer#Detach(ac8cfe8ff75bbad7).(gearcxx . . $ MyToolbar#gear.); else gearScxx . . $ MyToolbar#gearS.->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(gearcxx . . $ MyToolbar#gear.); |
| 222 |
gearcxx . . $ MyToolbar#gear.->Showcxx . . $ wxWindow#Show(efaadfb7dc14930a).(b); |
| 223 |
gearScxx . . $ MyToolbar#gearS.->Layoutcxx . . $ wxSizer#Layout(49f6e7a06ebc5aa8).(); |
| 224 |
gearPresentcxx . . $ MyToolbar#gearPresent.=b; |
| 225 |
/* |
| 226 |
if (b) |
| 227 |
gear->Raise(); |
| 228 |
else |
| 229 |
gear->Lower();*/ |
| 230 |
} |
| 231 |
|
| 232 |
MyToolbarcxx . . $ MyToolbar#::MyToolbarcxx . . $ MyToolbar#MyToolbar(fcd022dc193f5758).(wxTopLevelWindowcxx . . $ wxTopLevelWindow# *_parent, wxWindowIDcxx . . $ wxWindowID# id, |
| 233 |
const wxPointcxx . . $ wxPoint#& pos, |
| 234 |
const wxSizecxx . . $ wxSize#& size, |
| 235 |
long style, |
| 236 |
const wxStringcxx . . $ wxString#& name): wxPanelcxx . . $ wxPanel#(_parent, id, pos, size, style, name){ |
| 237 |
|
| 238 |
parentcxx . . $ MyToolbar#parent.=_parent; |
| 239 |
|
| 240 |
// let's build notebook |
| 241 |
/*wxNotebook **/notebookcxx . . $ notebook. = new wxNotebookcxx . . $ wxNotebook#( |
| 242 |
this, id, pos, size, |
| 243 |
0,/*style/*|wxNO_FULL_REPAINT_ON_RESIZE|wxNB_TOP,*/ |
| 244 |
name); |
| 245 |
|
| 246 |
for (int i=0; i<MyTabcxx . . $ MyTab#::Countcxx . . $ MyTab#Count(b126dc7c1de90089).(); i++) { |
| 247 |
//if (i==2) |
| 248 |
notebookcxx . . $ notebook.->AddPagecxx . . $ wxBookCtrlBase#AddPage(6ed82ed1a1dff39f).(new MyTabcxx . . $ MyTab#(notebookcxx . . $ notebook.,i), MyTabcxx . . $ MyTab#::Titlecxx . . $ MyTab#Title(5da42c17d995b65f).(i), i==0 ); |
| 249 |
parentcxx . . $ MyToolbar#parent.->SetBackgroundColourcxx . . $ wxWindow#SetBackgroundColour(c4d9c5755b95f2b4).(notebookcxx . . $ notebook.->GetBackgroundColourcxx . . $ wxWindowBase#GetBackgroundColour(6bb92bbeabf2e6a2).()); |
| 250 |
} |
| 251 |
|
| •252 |
#ifdef _WIN32 |
| 253 |
wxBitmapButton *snapButton = new wxBitmapButton(this, SnapButton, |
| 254 |
*LoadPngImage(_T("snap_off2")), wxDefaultPosition, wxSize(48,48),0); |
| 255 |
snapButton->SetBitmapSelected(*LoadPngImage(_T("snap_on"))); |
| 256 |
|
| 257 |
wxBitmapButton *openButton = new wxBitmapButton(this, OpenButton, |
| 258 |
*LoadPngImage(_T("open_off2")),wxDefaultPosition, wxSize(48,48),0); |
| 259 |
openButton->SetBitmapSelected(*LoadPngImage(_T("open_on"))); |
| 260 |
#else |
| 261 |
wxBitmapButtoncxx . . $ wxBitmapButton# *snapButton = new wxBitmapButtoncxx . . $ wxBitmapButton#wxBitmapButton(b69940992111adcc).(this, SnapButtoncxx . . $ `src/main.cpp:8:9`!, |
| 262 |
*cxx . . $ wxBitmapBundle#wxBitmapBundle(98862698a0401ee5).LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("snap_noborder")), wxDefaultPositioncxx . . $ wxDefaultPosition., wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(48,48),0); |
| 263 |
wxBitmapButtoncxx . . $ wxBitmapButton# *openButton = new wxBitmapButtoncxx . . $ wxBitmapButton#wxBitmapButton(b69940992111adcc).(this, OpenButtoncxx . . $ `src/main.cpp:9:9`!, |
| 264 |
*cxx . . $ wxBitmapBundle#wxBitmapBundle(98862698a0401ee5).LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("open_noborder")),wxDefaultPositioncxx . . $ wxDefaultPosition., wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(48,48),0); |
| 265 |
|
| 266 |
#endif |
| 267 |
wxBitmapButtoncxx . . $ wxBitmapButton# *quitButton = new wxBitmapButtoncxx . . $ wxBitmapButton#wxBitmapButton(b69940992111adcc).(this, QuitButtoncxx . . $ `src/main.cpp:10:9`!, |
| 268 |
*cxx . . $ wxBitmapBundle#wxBitmapBundle(98862698a0401ee5).LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("quitoff")), |
| 269 |
wxDefaultPositioncxx . . $ wxDefaultPosition., wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(15,16) , 0); |
| 270 |
quitButton->SetBitmapSelectedcxx . . $ wxAnyButtonBase#SetBitmapSelected(98862698a0401ee5).(*LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("quiton"))); |
| 271 |
|
| 272 |
wxStaticBitmapcxx . . $ wxStaticBitmap# *logo = new wxStaticBitmapcxx . . $ wxStaticBitmap#(this, wxID_ANYcxx . . $ wxID_ANY., *cxx . . $ wxBitmapBundle#wxBitmapBundle(98862698a0401ee5).LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("qutemolsm")), wxDefaultPositioncxx . . $ wxDefaultPosition. ); |
| 273 |
|
| 274 |
gearcxx . . $ MyToolbar#gear. = new wxStaticBitmapcxx . . $ wxStaticBitmap#(this, wxID_ANYcxx . . $ wxID_ANY., *cxx . . $ wxBitmapBundle#wxBitmapBundle(98862698a0401ee5).LoadPngImagecxx . . $ LoadPngImage(f28252153a20ddf5).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("gear2")), wxDefaultPositioncxx . . $ wxDefaultPosition. ); |
| 275 |
|
| 276 |
wxSizercxx . . $ wxSizer# *sizerButtons = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxVERTICALcxx . . $ wxVERTICAL. ); |
| 277 |
sizerButtons->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(openButton, 0, wxALLcxx . . $ wxALL., 1); |
| 278 |
sizerButtons->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(snapButton, 0, wxALLcxx . . $ wxALL., 1); |
| 279 |
|
| 280 |
titleTextcxx . . $ MyToolbar#titleText. = new wxStaticTextcxx . . $ wxStaticText#(this, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("")); |
| 281 |
titleTextcxx . . $ MyToolbar#titleText.->Disablecxx . . $ wxWindowBase#Disable(c9857a73d68e59ba).(); |
| 282 |
|
| •283 |
#ifdef _WIN32 |
| 284 |
wxSizer *linesizer1 = new wxBoxSizer(wxVERTICAL); |
| 285 |
|
| 286 |
linesizer1->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 287 |
linesizer1->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 288 |
linesizer1->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 289 |
|
| 290 |
wxSizer *linesizer2 = new wxBoxSizer(wxVERTICAL); |
| 291 |
linesizer2->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 292 |
linesizer2->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 293 |
linesizer2->Add(new wxStaticLine(this),0,wxALL| wxEXPAND, 1); |
| 294 |
|
| 295 |
titleTextSizer = new wxBoxSizer(wxHORIZONTAL); |
| 296 |
titleTextSizer->Add(3,3, 0, wxALL, 3); |
| 297 |
titleTextSizer->Add(linesizer1, 1, wxALL|wxALIGN_CENTER_VERTICAL, 0); |
| 298 |
titleTextSizer->Add(titleText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0); |
| 299 |
titleTextSizer->Add(linesizer2, 20, wxALL|wxALIGN_CENTER_VERTICAL, 0); |
| 300 |
titleTextSizer->Add(3,3, 0, wxALL, 3); // spacer |
| 301 |
titleTextSizer->Add(quitButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 2); |
| 302 |
|
| 303 |
#else |
| 304 |
quitButton->Hidecxx . . $ wxWindowBase#Hide(c9857a73d68e59ba).(); |
| 305 |
titleTextcxx . . $ MyToolbar#titleText.->Hidecxx . . $ wxWindowBase#Hide(c9857a73d68e59ba).(); |
| 306 |
#endif |
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
wxSizercxx . . $ wxSizer# *imgsizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 311 |
imgsizer->Addcxx . . $ wxSizer#Add(6ba8f39d9a6b2465).(22,22, 0); |
| 312 |
//imgsizer->Add(1,1, 10); |
| 313 |
imgsizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(logo, 1, wxALLcxx . . $ wxALL.|wxALIGN_CENTER_VERTICALcxx . . $ wxALIGN_CENTER_VERTICAL.|wxALIGN_CENTER_HORIZONTALcxx . . $ wxALIGN_CENTER_HORIZONTAL., 0); // LOGO |
| 314 |
//imgsizer->Add(1,1, 9); |
| 315 |
|
| 316 |
gearScxx . . $ MyToolbar#gearS. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 317 |
gearScxx . . $ MyToolbar#gearS.->Addcxx . . $ wxSizer#Add(6ba8f39d9a6b2465).(22,22,1); |
| 318 |
gearScxx . . $ MyToolbar#gearS.->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(gearcxx . . $ MyToolbar#gear.); |
| 319 |
gearPresentcxx . . $ MyToolbar#gearPresent.=true; |
| 320 |
|
| 321 |
imgsizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(gearScxx . . $ MyToolbar#gearS., 0, wxALLcxx . . $ wxALL.|wxALIGN_BOTTOMcxx . . $ wxALIGN_BOTTOM.|wxALIGN_CENTER_HORIZONTALcxx . . $ wxALIGN_CENTER_HORIZONTAL., 2); // LOGO |
| 322 |
|
| 323 |
wxSizercxx . . $ wxSizer# *topRsizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| •324 |
#ifdef _WIN32 |
| 325 |
topRsizer->Add(titleTextSizer,0, wxALL| wxEXPAND, 0); |
| 326 |
#endif |
| •327 |
topRsizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(imgsizer,1, wxALLcxx . . $ wxALL.| wxEXPANDcxx . . $ wxEXPAND., 0); |
| 328 |
|
| 329 |
topsizercxx . . $ MyToolbar#topsizer. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 330 |
topsizercxx . . $ MyToolbar#topsizer.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(sizerButtons, 0, wxALLcxx . . $ wxALL., 5); |
| 331 |
topsizercxx . . $ MyToolbar#topsizer.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(topRsizer, 1, wxALIGN_TOPcxx . . $ wxALIGN_TOP.| wxALLcxx . . $ wxALL.| wxEXPANDcxx . . $ wxEXPAND., 0); |
| 332 |
|
| 333 |
|
| 334 |
wxSizercxx . . $ wxSizer# *globalsizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 335 |
globalsizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(topsizercxx . . $ MyToolbar#topsizer., 0, wxALLcxx . . $ wxALL.| wxEXPANDcxx . . $ wxEXPAND., 0); |
| 336 |
//globalsizer->Add(5, 5, 0, wxALL, 0); // spacer |
| 337 |
globalsizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(notebookcxx . . $ notebook., 1, wxALLcxx . . $ wxALL.|wxEXPANDcxx . . $ wxEXPAND., 0); |
| 338 |
|
| 339 |
SetSizercxx . . $ wxWindowBase#SetSizer(6b8f606b81107616).(globalsizer); |
| 340 |
|
| 341 |
UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).(false); |
| 342 |
|
| 343 |
} |
| 344 |
|
| 345 |
|
| 346 |
// `Main program' equivalent, creating windows and returning main app frame |
| 347 |
bool MyAppcxx . . $ MyApp#::OnInitcxx . . $ MyApp#OnInit(c9857a73d68e59ba).() |
| 348 |
{ |
| 349 |
hardSettingscxx . . $ hardSettings..OnStartcxx . . $ HardSettings#OnStart(49f6e7a06ebc5aa8).(); |
| 350 |
|
| 351 |
cgSettingscxx . . $ cgSettings..SetDefaultscxx . . $ CgUtil#SetDefaults(49f6e7a06ebc5aa8).(); // <-- quick hack (solves wrong constructor order): |
| 352 |
|
| 353 |
//if (!wxApp::OnInit()) return false; |
| 354 |
|
| 355 |
// questo per caricare salvare PNG... |
| 356 |
wxImagecxx . . $ wxImage#::AddHandlercxx . . $ wxImage#AddHandler(9e4d7cff68f64dfc).(new wxPNGHandlercxx . . $ wxPNGHandler#); |
| 357 |
wxImagecxx . . $ wxImage#::AddHandlercxx . . $ wxImage#AddHandler(9e4d7cff68f64dfc).(new wxJPEGHandlercxx . . $ wxJPEGHandler#); |
| 358 |
|
| 359 |
// Create the main frame window |
| 360 |
MyFramecxx . . $ MyFrame# *frame = new MyFramecxx . . $ MyFrame#(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("QuteMol"), |
| 361 |
// wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE //wxRESIZE_BORDER |
| •362 |
#ifndef _WIN32 |
| 363 |
wxDefaultPositioncxx . . $ wxDefaultPosition., wxDefaultSizecxx . . $ wxDefaultSize.,wxDEFAULT_FRAME_STYLEcxx . . $ `<external>/10524890736914687764/toplevel.h:86:9`!| wxRESIZE_BORDERcxx . . $ `<external>/10524890736914687764/toplevel.h:76:9`! |
| 364 |
#else |
| 365 |
wxDefaultPosition, wxDefaultSize,wxRESIZE_BORDER |
| 366 |
#endif |
| 367 |
); |
| 368 |
|
| 369 |
/* Make a menubar */ |
| 370 |
|
| 371 |
/* |
| 372 |
// ...or, maybe NOT |
| 373 |
wxMenu *fileMenu = new wxMenu; |
| 374 |
|
| 375 |
fileMenu->Append(wxID_EXIT, wxT("E&xit")); |
| 376 |
fileMenu->Append(wxID_ABOUT, wxT("A&bout")); |
| 377 |
fileMenu->Append(wxID_OPEN, wxT("O&pen")); |
| 378 |
|
| 379 |
wxMenuBar *menuBar = new wxMenuBar; |
| 380 |
menuBar->Append(fileMenu, wxT("&File")); |
| 381 |
|
| 382 |
frame->SetMenuBar(menuBar); |
| 383 |
*/ |
| 384 |
|
| 385 |
frame->SetCanvascxx . . $ MyFrame#SetCanvas(d9f9b3934768c619).( |
| 386 |
new TestGLCanvascxx . . $ TestGLCanvas#TestGLCanvas(bcdeeae89954f8a3).( |
| 387 |
frame, wxID_ANYcxx . . $ wxID_ANY., wxPointcxx . . $ wxPoint#wxPoint(3e454b8ccf442868).(0,0), wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).( winxcxx . . $ winx., winycxx . . $ winy. ), wxNO_BORDERcxx . . $ `<external>/14689491191722134862/defs.h:1648:9`! //wxSUNKEN_BORDER |
| 388 |
) |
| 389 |
); |
| 390 |
|
| 391 |
// onle TestGLCanvas to process idles... |
| 392 |
wxIdleEventcxx . . $ wxIdleEvent#::SetModecxx . . $ wxIdleEvent#SetMode(df1c624b688efe2b).(wxIDLE_PROCESS_SPECIFIEDcxx . . $ wxIDLE_PROCESS_SPECIFIED.); |
| 393 |
frame->SetExtraStylecxx . . $ wxWindowBase#SetExtraStyle(1624ee8275b10bda).(wxWS_EX_PROCESS_IDLEcxx . . $ `<external>/14689491191722134862/defs.h:1737:9`! ); |
| 394 |
|
| 395 |
MyTabcxx . . $ MyTab#::frame2redrawcxx . . $ MyTab#frame2redraw.=frame->GetCanvascxx . . $ MyFrame#GetCanvas(8d8252a2e6bb20ff).(); |
| 396 |
|
| 397 |
frame->SetToolbarcxx . . $ MyFrame#SetToolbar(6b0ec63e9752136a).( |
| 398 |
new MyToolbarcxx . . $ MyToolbar#( |
| 399 |
frame, wxID_ANYcxx . . $ wxID_ANY., wxPointcxx . . $ wxPoint#wxPoint(3e454b8ccf442868).(winxcxx . . $ winx.,0), wxDefaultSizecxx . . $ wxDefaultSize., |
| 400 |
// wxNO_BORDER //wxSUNKEN_BORDER |
| 401 |
wxDEFAULT_FRAME_STYLEcxx . . $ `<external>/10524890736914687764/toplevel.h:86:9`! |
| 402 |
| |
| 403 |
// wxNO_FULL_REPAINT_ON_RESIZE | |
| 404 |
wxCLIP_CHILDRENcxx . . $ `<external>/14689491191722134862/defs.h:1659:9`! | |
| 405 |
wxTAB_TRAVERSALcxx . . $ `<external>/14689491191722134862/defs.h:1669:9`! |
| 406 |
) |
| 407 |
); |
| 408 |
|
| 409 |
wxSizercxx . . $ wxSizer# *sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 410 |
sizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(frame->GetCanvascxx . . $ MyFrame#GetCanvas(8d8252a2e6bb20ff).(), 1, wxGROWcxx . . $ wxGROW.|wxSHAPEDcxx . . $ wxSHAPED.); |
| 411 |
sizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(frame->GetToolbarcxx . . $ MyFrame#GetToolbar(9823672ec5e9bb7e).(), 0, wxGROWcxx . . $ wxGROW.); |
| 412 |
frame->SetSizercxx . . $ wxWindowBase#SetSizer(6b8f606b81107616).(sizer); |
| 413 |
|
| •414 |
int tbsize=frame->GetToolbarcxx . . $ MyFrame#GetToolbar(9823672ec5e9bb7e).()->GetEffectiveMinSizecxx . . $ wxWindowBase#GetEffectiveMinSize(1760195b8cec6c4e).().xcxx . . $ wxSize#x.; |
| 415 |
frame->GetToolbarcxx . . $ MyFrame#GetToolbar(9823672ec5e9bb7e).()->SetSizecxx . . $ wxWindowBase#SetSize(3e454b8ccf442868).(tbsize,winycxx . . $ winy.); |
| 416 |
frame->GetToolbarcxx . . $ MyFrame#GetToolbar(9823672ec5e9bb7e).()->Layoutcxx . . $ wxWindowBase#Layout(c9857a73d68e59ba).(); |
| 417 |
|
| 418 |
//frame->SetMinSize(wxSize(tbsize+200,200)); |
| 419 |
frame->SetClientSizecxx . . $ wxWindowBase#SetClientSize(6492bae9731bf298).(wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(winxcxx . . $ winx.+tbsize,winycxx . . $ winy.)); |
| 420 |
|
| 421 |
static const wxCmdLineEntryDesccxx . . $ wxCmdLineEntryDesc# cmdLineDesc[] = |
| 422 |
{ |
| 423 |
{ |
| •424 |
wxCMD_LINE_PARAMcxx . . $ wxCMD_LINE_PARAM.,wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!(""),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!(""),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!("filename.pdb:(molecule to be drawn)"), |
| 425 |
wxCMD_LINE_VAL_STRINGcxx . . $ wxCMD_LINE_VAL_STRING., wxCMD_LINE_PARAM_OPTIONALcxx . . $ wxCMD_LINE_PARAM_OPTIONAL. |
| 426 |
}, |
| 427 |
{ |
| •428 |
wxCMD_LINE_OPTIONcxx . . $ wxCMD_LINE_OPTION.,wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!("a"),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!(""),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!("filename.art: optional Atom Render Table"), |
| 429 |
wxCMD_LINE_VAL_STRINGcxx . . $ wxCMD_LINE_VAL_STRING., wxCMD_LINE_PARAM_OPTIONALcxx . . $ wxCMD_LINE_PARAM_OPTIONAL. |
| 430 |
}, |
| 431 |
{ |
| •432 |
wxCMD_LINE_SWITCHcxx . . $ wxCMD_LINE_SWITCH.,wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!("v"),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!(""),wxT_2cxx . . $ `<external>/13533349018018911527/chartype.h:207:9`!("don't start, show version name"), |
| 433 |
wxCMD_LINE_VAL_STRINGcxx . . $ wxCMD_LINE_VAL_STRING., wxCMD_LINE_PARAM_OPTIONALcxx . . $ wxCMD_LINE_PARAM_OPTIONAL. |
| 434 |
}, |
| 435 |
{ wxCMD_LINE_NONEcxx . . $ wxCMD_LINE_NONE. } |
| 436 |
}; |
| 437 |
|
| 438 |
wxCmdLineParsercxx . . $ wxCmdLineParser# parsercxx . . $ wxCmdLineParser#wxCmdLineParser(3eee22581e0a04f8).(cmdLineDesc, argccxx . . $ wxAppConsoleBase#argc., argvcxx . . $ wxAppConsoleBase#argv.); |
| 439 |
|
| 440 |
parser.Parsecxx . . $ wxCmdLineParser#Parse(73da94e76e6bd037).(); |
| 441 |
|
| 442 |
InitQuteMolcxx . . $ InitQuteMol(5c4306d8553b3696).( NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`! ); |
| 443 |
|
| 444 |
wxStringcxx . . $ wxString# artFilenamecxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 445 |
if (parser.Foundcxx . . $ wxCmdLineParser#Found(5ade71cf3e6ae33c).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("v"))>0) { |
| 446 |
FILEcxx . . $ FILE# *f=fopen("output.txt", "wt"); |
| 447 |
if (f) { |
| 448 |
fprintf(f,"ver 0.4.1"); |
| 449 |
fclose(f); |
| 450 |
} |
| 451 |
exitcxx . . $ exit(44ed87f96534fad7).(0); |
| 452 |
} |
| 453 |
|
| 454 |
if (parser.Foundcxx . . $ wxCmdLineParser#Found(832951b34a050c1a).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("a"),&artFilename)>0) { |
| 455 |
if (!readArtFilecxx . . $ readArtFile(c5f7da30cbc0f4e9).(artFilename.ToAsciicxx . . $ wxString#ToAscii(76dff3f4aa5b2917).())) { |
| 456 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).( |
| •457 |
wxStringcxx . . $ wxString#(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Error reading art file \"") +cxx . . $ operator+(b9d4cd82031bb246). artFilename +cxx . . $ operator+(707d0521c75ba302). _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("\"")), |
| 458 |
_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Error reading art file"), |
| 459 |
wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_EXCLAMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1906:9`!, frame); |
| 460 |
exitcxx . . $ exit(44ed87f96534fad7).(0); |
| 461 |
return false; |
| 462 |
} |
| 463 |
} |
| 464 |
|
| 465 |
if (parser.GetParamCountcxx . . $ wxCmdLineParser#GetParamCount(fe4d2d262d4164a8).()>0) frame->OnReadFilecxx . . $ MyFrame#OnReadFile(867e7b693acc3d1f).(parser.GetParamcxx . . $ wxCmdLineParser#GetParam(9f8a3fe87bc28214).(0)); |
| 466 |
/* InitQuteMol( parser.GetParam(0).mb_str(wxConvUTF8) ); |
| 467 |
} else { |
| 468 |
InitQuteMol( NULL ); |
| 469 |
}*/ |
| 470 |
|
| 471 |
/* Show the frame */ |
| 472 |
|
| 473 |
frame->Centercxx . . $ wxWindowBase#Center(d4f767463ce0a6b3).(); |
| 474 |
frame->SetDropTargetcxx . . $ wxWindow#SetDropTarget(b45e7562002de16f).( new MyDropTargetcxx . . $ MyDropTarget#(frame) ); |
| 475 |
frame->Showcxx . . $ wxTopLevelWindowGTK#Show(efaadfb7dc14930a).(true); |
| 476 |
|
| 477 |
return true; |
| 478 |
} |
| 479 |
void MyFramecxx . . $ MyFrame#::ResetAOcxx . . $ MyFrame#ResetAO(49f6e7a06ebc5aa8).(){ |
| 480 |
molcxx . . $ mol..ResetAOcxx . . $ Mol#ResetAO(49f6e7a06ebc5aa8).(); |
| 481 |
} |
| 482 |
|
| 483 |
|
| 484 |
IMPLEMENT_APPcxx . . $ `<external>/5875752220028509956/app.h:944:9`!(MyApp) |
| 485 |
|
| 486 |
BEGIN_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4797:9`!(MyFrame, wxFrame) |
| 487 |
//EVT_PAINT(MyFrame::OnPaint) |
| 488 |
#if defined(_WIN32) |
| 489 |
EVT_ERASE_BACKGROUND(MyFrame::OnEraseBackground) |
| 490 |
#endif |
| 491 |
EVT_SIZEcxx . . $ `<external>/9123237030240659982/event.h:4533:9`!(MyFrame::OnSize) |
| 492 |
EVT_BUTTONcxx . . $ `<external>/9123237030240659982/event.h:4706:9`!(OpenButtoncxx . . $ `src/main.cpp:9:9`!, MyFrame::OnOpenFile) |
| 493 |
EVT_BUTTONcxx . . $ `<external>/9123237030240659982/event.h:4706:9`!(SnapButtoncxx . . $ `src/main.cpp:8:9`!, MyFrame::OnSaveSnap) |
| 494 |
EVT_BUTTONcxx . . $ `<external>/9123237030240659982/event.h:4706:9`!(QuitButtoncxx . . $ `src/main.cpp:10:9`!, MyFrame::OnExit) |
| 495 |
EVT_KEY_DOWNcxx . . $ `<external>/9123237030240659982/event.h:4546:9`!(MyFrame::OnKeyDown) |
| 496 |
EVT_KEY_UPcxx . . $ `<external>/9123237030240659982/event.h:4547:9`!(MyFrame::OnKeyUp) |
| 497 |
EVT_IDLEcxx . . $ `<external>/9123237030240659982/event.h:4748:9`!(MyFrame::OnIdle) |
| 498 |
END_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4804:9`!() |
| 499 |
|
| 500 |
|
| 501 |
BEGIN_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4797:9`!(MyToolbar, wxPanel) |
| 502 |
EVT_MOUSE_EVENTScxx . . $ `<external>/9123237030240659982/event.h:4605:9`!(MyToolbar::OnDrag) |
| 503 |
END_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4804:9`!() |
| 504 |
|
| 505 |
|
| 506 |
void MyFramecxx . . $ MyFrame#::OnKeyUpcxx . . $ MyFrame#OnKeyUp(f4be455c09aa147).( wxKeyEventcxx . . $ wxKeyEvent#& event ){ |
| 507 |
m_canvascxx . . $ MyFrame#m_canvas.->OnKeyUpcxx . . $ TestGLCanvas#OnKeyUp(f4be455c09aa147).(event); |
| 508 |
} |
| 509 |
|
| 510 |
void MyFramecxx . . $ MyFrame#::OnKeyDowncxx . . $ MyFrame#OnKeyDown(f4be455c09aa147).( wxKeyEventcxx . . $ wxKeyEvent#& event ){ |
| 511 |
m_canvascxx . . $ MyFrame#m_canvas.->OnKeyDowncxx . . $ TestGLCanvas#OnKeyDown(f4be455c09aa147).(event); |
| 512 |
} |
| 513 |
|
| 514 |
|
| 515 |
/* My frame constructor */ |
| 516 |
MyFramecxx . . $ MyFrame#::MyFramecxx . . $ MyFrame#MyFrame(d08e3261cede07af).(wxFramecxx . . $ wxFrame# *frame, const wxStringcxx . . $ wxString#& title, const wxPointcxx . . $ wxPoint#& pos, |
| 517 |
const wxSizecxx . . $ wxSize#& size, long style) |
| 518 |
: wxFramecxx . . $ wxFrame#wxFrame(d091a3913c1b2ac).(frame, wxID_ANYcxx . . $ wxID_ANY., title, pos, size, style) |
| 519 |
{ |
| 520 |
m_canvascxx . . $ MyFrame#m_canvas. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 521 |
m_tbcxx . . $ MyFrame#m_tb.= NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| •522 |
#if WIN32 |
| 523 |
SetIcon(wxIcon(_T("sample"),wxBITMAP_TYPE_ICO_RESOURCE,32,32)); |
| 524 |
#else |
| 525 |
SetIconcxx . . $ wxTopLevelWindowBase#SetIcon(d249de01a60891a7).(wxIconcxx . . $ wxIcon#wxIcon(ac4b840ac9fbb56d).(sample_xpmcxx . . $ sample_xpm.)); |
| 526 |
#endif |
| •527 |
|
| 528 |
resize_modecxx . . $ MyFrame#resize_mode.=NATURALcxx . . $ MyFrame#NATURAL.; |
| 529 |
} |
| 530 |
|
| 531 |
//void MyFrame::OnPaint( wxPaintEvent& event ) |
| 532 |
//{ |
| 533 |
// wxFrame::OnPaint(event); |
| 534 |
//} |
| 535 |
|
| 536 |
|
| 537 |
void MyFramecxx . . $ MyFrame#::OnSizecxx . . $ MyFrame#OnSize(2b95f7f26403c12f).(wxSizeEventcxx . . $ wxSizeEvent#& event){ |
| 538 |
|
| 539 |
int w,h; |
| 540 |
GetClientSizecxx . . $ wxWindowBase#GetClientSize(17144c1a7896dbb).(&w,&h); |
| 541 |
int hlogo = m_tbcxx . . $ MyFrame#m_tb.->topsizercxx . . $ MyToolbar#topsizer.->GetMinSizecxx . . $ wxSizer#GetMinSize(bc55a34d0a1c1eb0).().ycxx . . $ wxSize#y. + 40; |
| 542 |
if (MyTabcxx . . $ MyTab#::Redisposecxx . . $ MyTab#Redispose(83c267b20bac841a).(h - hlogo )) { |
| 543 |
GetToolbarcxx . . $ MyFrame#GetToolbar(9823672ec5e9bb7e).()->SetSizecxx . . $ wxWindowBase#SetSize(3e454b8ccf442868).(200,winycxx . . $ winy.); |
| 544 |
} |
| 545 |
|
| 546 |
if (resize_modecxx . . $ MyFrame#resize_mode.==FORCEDcxx . . $ MyFrame#FORCED. ) { |
| 547 |
// TODO: fullscreen resize |
| 548 |
//m_canvas->; |
| 549 |
//m_tb->; |
| 550 |
resize_modecxx . . $ MyFrame#resize_mode.=NATURALcxx . . $ MyFrame#NATURAL.; |
| 551 |
wxFramecxx . . $ wxFrame#::OnSizecxx . . $ wxTopLevelWindowBase#OnSize(2b95f7f26403c12f).(event); |
| 552 |
//m_tb->Fit(); |
| 553 |
//m_tb->GetSizer()->RecalcSizes(); |
| 554 |
//GetSizer()->RecalcSizes(); |
| 555 |
//notebook->Layout(); |
| 556 |
//notebook->SetSize(100,100); |
| 557 |
//m_tb->SetSize(100,100); |
| 558 |
//notebook->GetSizer()->RecalcSizes();; |
| 559 |
//m_tb->Layout(); |
| 560 |
//Layout(); |
| 561 |
// Fit(); |
| 562 |
} else |
| 563 |
if (resize_modecxx . . $ MyFrame#resize_mode.==NATURALcxx . . $ MyFrame#NATURAL. ) { |
| 564 |
wxFramecxx . . $ wxFrame#::OnSizecxx . . $ wxTopLevelWindowBase#OnSize(2b95f7f26403c12f).(event); |
| 565 |
/* |
| 566 |
GetClientSize(&w,&h); |
| 567 |
int tbsize=GetToolbar()->GetBestFittingSize().x; |
| 568 |
winx=w-tbsize; |
| 569 |
winy=h; |
| 570 |
|
| 571 |
GetToolbar()->SetPosition( wxPoint(winx,0) ); |
| 572 |
GetToolbar()->SetSize(tbsize,winy); |
| 573 |
GetCanvas()->SetSize(winx,winy); |
| 574 |
*/ |
| 575 |
resize_modecxx . . $ MyFrame#resize_mode.=CUSTOMcxx . . $ MyFrame#CUSTOM.; |
| 576 |
} |
| 577 |
else { |
| 578 |
|
| 579 |
static int oldw=0,oldh=0; |
| 580 |
|
| 581 |
|
| •582 |
int w1=m_tbcxx . . $ MyFrame#m_tb.->GetEffectiveMinSizecxx . . $ wxWindowBase#GetEffectiveMinSize(1760195b8cec6c4e).().xcxx . . $ wxSize#x.; |
| 583 |
// |
| 584 |
|
| 585 |
int sx=w-w1, sy=h , s; |
| 586 |
|
| 587 |
if ((oldw==w) && (oldh!=h)) s=sy; else |
| 588 |
if ((oldh==h) && (oldw!=w)) s=sx; else |
| 589 |
s=(sx+sy)/2; |
| 590 |
|
| 591 |
wxSizecxx . . $ wxSize# size=wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(s+w1, s); |
| 592 |
resize_modecxx . . $ MyFrame#resize_mode.=NATURALcxx . . $ MyFrame#NATURAL.; |
| 593 |
SetClientSizecxx . . $ wxWindowBase#SetClientSize(6492bae9731bf298).(size); |
| 594 |
|
| 595 |
//wxFrame::OnSize( event ); |
| 596 |
//wxSizeEvent event2=wxSizeEvent(size); |
| 597 |
//wxFrame::OnSize(event2); |
| 598 |
|
| 599 |
//oldw=w;oldh=h; |
| 600 |
} |
| 601 |
} |
| 602 |
|
| 603 |
void MyFramecxx . . $ MyFrame#::Maximizecxx . . $ MyFrame#Maximize(b45ddcbc8423892c).(bool max){ |
| 604 |
|
| 605 |
//if (custom_resizing) { |
| 606 |
resize_modecxx . . $ MyFrame#resize_mode.=FORCEDcxx . . $ MyFrame#FORCED.; |
| 607 |
wxFramecxx . . $ wxFrame#::Maximizecxx . . $ wxTopLevelWindowGTK#Maximize(b45ddcbc8423892c).(max); |
| 608 |
//} |
| 609 |
} |
| 610 |
|
| 611 |
/* Intercept menu commands */ |
| 612 |
void MyFramecxx . . $ MyFrame#::OnExitcxx . . $ MyFrame#OnExit(f55e5a77ec619b42).( wxCommandEventcxx . . $ wxCommandEvent#& WXUNUSEDcxx . . $ `<external>/14689491191722134862/defs.h:988:13`!(event) ) |
| 613 |
{ |
| 614 |
Closecxx . . $ wxWindowBase#Close(efaadfb7dc14930a).(); |
| 615 |
} |
| 616 |
|
| 617 |
BEGIN_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4797:9`!(TestGLCanvas, wxGLCanvas) |
| 618 |
EVT_SIZEcxx . . $ `<external>/9123237030240659982/event.h:4533:9`!(TestGLCanvas::OnSize) |
| 619 |
EVT_PAINTcxx . . $ `<external>/9123237030240659982/event.h:4542:9`!(TestGLCanvas::OnPaint) |
| 620 |
EVT_ERASE_BACKGROUNDcxx . . $ `<external>/9123237030240659982/event.h:4544:9`!(TestGLCanvas::OnEraseBackground) |
| 621 |
EVT_MOUSE_EVENTScxx . . $ `<external>/9123237030240659982/event.h:4605:9`!(TestGLCanvas::OnMouse) |
| 622 |
EVT_KEY_DOWNcxx . . $ `<external>/9123237030240659982/event.h:4546:9`!(TestGLCanvas::OnKeyDown) |
| 623 |
EVT_KEY_UPcxx . . $ `<external>/9123237030240659982/event.h:4547:9`!(TestGLCanvas::OnKeyUp) |
| 624 |
END_EVENT_TABLEcxx . . $ `<external>/9123237030240659982/event.h:4804:9`!() |
| 625 |
|
| 626 |
TestGLCanvascxx . . $ TestGLCanvas#::TestGLCanvascxx . . $ TestGLCanvas#TestGLCanvas(bcdeeae89954f8a3).(wxWindowcxx . . $ wxWindow# *_parent, wxWindowIDcxx . . $ wxWindowID# id, |
| 627 |
const wxPointcxx . . $ wxPoint#& pos, const wxSizecxx . . $ wxSize#& size, long style, const wxStringcxx . . $ wxString#& name) |
| •628 |
: wxGLCanvascxx . . $ wxGLCanvas#wxGLCanvas(1719ef592c24fce9).(_parent, id, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, pos, size, style|wxFULL_REPAINT_ON_RESIZEcxx . . $ `<external>/14689491191722134862/defs.h:1694:9`!, name) |
| 629 |
{ |
| 630 |
initdonecxx . . $ TestGLCanvas#initdone.=false; |
| 631 |
shownHQcxx . . $ TestGLCanvas#shownHQ.=false; |
| •632 |
m_glRCcxx . . $ TestGLCanvas#m_glRC. = new wxGLContextcxx . . $ wxGLContext#wxGLContext(b67572187efaf137).(this); |
| 633 |
} |
| 634 |
|
| 635 |
TestGLCanvascxx . . $ TestGLCanvas#::~cxx . . $ TestGLCanvas#`~TestGLCanvas`(ced63f7c635d850d).TestGLCanvascxx . . $ TestGLCanvas#() |
| 636 |
{ |
| •637 |
delete m_glRCcxx . . $ TestGLCanvas#m_glRC.; |
| 638 |
} |
| 639 |
|
| 640 |
|
| 641 |
wxStringcxx . . $ wxString# errorMSGcxx . . $ errorMSG(5da42c17d995b65f).(int errcode){ |
| 642 |
wxStringcxx . . $ wxString# rescxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 643 |
res=cxx . . $ wxString#`operator=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("OpenGL problems:\n\n"); |
| 644 |
if (errcode&ERRGL_NO_GLEWcxx . . $ `src/Common.h:37:9`!) { |
| 645 |
res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - cannot initialize GLEW:\n "); |
| 646 |
res+=cxx . . $ wxString#`operator+=`(1f5e30095c40e9eb). wxStringcxx . . $ wxString#::FromAsciicxx . . $ wxString#FromAscii(1d94b37a0d0b5d9).(CgUtilcxx . . $ CgUtil#::lasterrcxx . . $ CgUtil#lasterr.); |
| 647 |
res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("\n"); |
| 648 |
} |
| 649 |
if (errcode&ERRGL_NO_FScxx . . $ `src/Common.h:32:9`!) res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - no Programmable Fragment Shader found\n"); |
| 650 |
if (errcode&ERRGL_NO_VScxx . . $ `src/Common.h:33:9`!) res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - no Programmable Vertex Shader found\n"); |
| 651 |
if (errcode&ERRGL_NO_FBO_SHADOWMAPcxx . . $ `src/Common.h:34:9`!) res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - cannot initialize FrameBufferObject for shadowmaps\n"); |
| 652 |
if (errcode&ERRGL_NO_FBO_HALOcxx . . $ `src/Common.h:35:9`!) res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - cannot initialize FrameBufferObject for halos\n"); |
| 653 |
if (errcode&ERRGL_NO_FBO_HALOcxx . . $ `src/Common.h:35:9`!) res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - cannot initialize FrameBufferObject for A.O. computation\n"); |
| 654 |
res+=cxx . . $ wxString#`operator+=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("\n(Hint: update graphic card drivers)"); |
| 655 |
return rescxx . . $ wxString#wxString(fc71acbd3c104663).; |
| 656 |
} |
| 657 |
|
| 658 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnPaintcxx . . $ TestGLCanvas#OnPaint(954efb20b042ed11).( wxPaintEventcxx . . $ wxPaintEvent#& event ) |
| 659 |
{ |
| 660 |
|
| 661 |
|
| 662 |
/* must always be here */ |
| 663 |
wxPaintDCcxx . . $ wxPaintDC# dccxx . . $ wxPaintDC#wxPaintDC(4289b2e0b1e17a99).(this); |
| 664 |
|
| •665 |
SetCurrentcxx . . $ wxGLCanvasBase#SetCurrent(e8b9a6973ffbbdb2).(*m_glRCcxx . . $ TestGLCanvas#m_glRC.); |
| 666 |
|
| 667 |
if (!initdonecxx . . $ TestGLCanvas#initdone.) { |
| 668 |
static bool once=false; |
| 669 |
if (!once) { |
| 670 |
once=true; |
| 671 |
int errcode=initGlcxx . . $ initGl(b126dc7c1de90089).(); |
| 672 |
if (errcode!=ERRGL_OKcxx . . $ `src/Common.h:31:9`!){ |
| 673 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(errorMSGcxx . . $ errorMSG(5da42c17d995b65f).(errcode), _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Unrecoverable error: Problems initializing graphics"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_EXCLAMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1906:9`!, this); |
| 674 |
exitcxx . . $ exit(44ed87f96534fad7).(0); |
| 675 |
} |
| 676 |
else initdonecxx . . $ TestGLCanvas#initdone.=true; |
| 677 |
} |
| 678 |
} |
| 679 |
|
| •680 |
#ifdef _WIN32 |
| 681 |
if (!initdone) wxGLCanvas::OnPaint(event); else |
| •682 |
#endif |
| 683 |
if (molcxx . . $ mol..IsReadycxx . . $ Mol#IsReady(c9857a73d68e59ba).()) { |
| 684 |
if (mustDoHQcxx . . $ mustDoHQ.) { |
| 685 |
drawFramecxx . . $ drawFrame(d4f767463ce0a6b3).( hardSettingscxx . . $ hardSettings..STILL_QUALITYcxx . . $ HardSettings#STILL_QUALITY. ); |
| 686 |
shownHQcxx . . $ TestGLCanvas#shownHQ.=true; |
| 687 |
mustDoHQcxx . . $ mustDoHQ.=false; |
| 688 |
} else { |
| 689 |
drawFramecxx . . $ drawFrame(d4f767463ce0a6b3).( hardSettingscxx . . $ hardSettings..MOVING_QUALITYcxx . . $ HardSettings#MOVING_QUALITY. ); |
| 690 |
shownHQcxx . . $ TestGLCanvas#shownHQ.=false; |
| 691 |
} |
| 692 |
SwapBufferscxx . . $ wxGLCanvasX11#SwapBuffers(c9857a73d68e59ba).(); |
| 693 |
} |
| 694 |
else { |
| 695 |
clearFramecxx . . $ clearFrame(49f6e7a06ebc5aa8).(); |
| 696 |
SwapBufferscxx . . $ wxGLCanvasX11#SwapBuffers(c9857a73d68e59ba).(); |
| 697 |
} |
| 698 |
} |
| 699 |
|
| 700 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnSizecxx . . $ TestGLCanvas#OnSize(2b95f7f26403c12f).(wxSizeEventcxx . . $ wxSizeEvent#& event) |
| 701 |
{ |
| 702 |
|
| 703 |
// set GL viewport (not called by wxGLCanvas::OnSize on all platforms...) |
| 704 |
|
| 705 |
GetClientSizecxx . . $ wxWindowBase#GetClientSize(17144c1a7896dbb).(&winxcxx . . $ winx., &winycxx . . $ winy.); |
| 706 |
mainCanvascxx . . $ mainCanvas..SetVideoSizecxx . . $ MyCanvas#SetVideoSize(d4f767463ce0a6b3).(winxcxx . . $ winx.); |
| 707 |
{ |
| •708 |
SetCurrentcxx . . $ wxGLCanvasBase#SetCurrent(e8b9a6973ffbbdb2).(*m_glRCcxx . . $ TestGLCanvas#m_glRC.); |
| 709 |
glViewport(0, 0, (GLint) winxcxx . . $ winx., (GLint) winycxx . . $ winy.); |
| 710 |
} |
| 711 |
} |
| 712 |
|
| 713 |
|
| •714 |
#if defined(_WIN32) |
| 715 |
void MyFrame::OnEraseBackground(wxEraseEvent& event) |
| 716 |
{ |
| 717 |
wxFrame::OnEraseBackground(event); |
| 718 |
/* Do nothing, to avoid flashing on MSW */ |
| 719 |
} |
| •720 |
#endif |
| 721 |
|
| 722 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnEraseBackgroundcxx . . $ TestGLCanvas#OnEraseBackground(f5067e5101ec9e9).(wxEraseEventcxx . . $ wxEraseEvent#& event) |
| 723 |
{ |
| •724 |
#if defined(_WIN32) |
| 725 |
if (!initdone) wxGLCanvas::OnEraseBackground(event); |
| •726 |
#endif |
| 727 |
/* Do else do nothing, to avoid flashing on MSW */ |
| 728 |
} |
| 729 |
|
| 730 |
bool wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(d36bb307a5d901e6).(wxMouseEventcxx . . $ wxMouseEvent#& event, Trackballcxx . . $ vcg/Trackball# &track); |
| 731 |
bool wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(6cc2ff6820429036).(wxKeyEventcxx . . $ wxKeyEvent#& event, bool down, Trackballcxx . . $ vcg/Trackball# &track); |
| 732 |
|
| 733 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnKeyUpcxx . . $ TestGLCanvas#OnKeyUp(f4be455c09aa147).( wxKeyEventcxx . . $ wxKeyEvent#& event ){ |
| 734 |
wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(6cc2ff6820429036).(event,false,trackcxx . . $ track.); |
| 735 |
} |
| 736 |
|
| 737 |
extern int CSIZEcxx . . $ CSIZE.; // number of texels for a patch of an aotm |
| 738 |
|
| 739 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnKeyDowncxx . . $ TestGLCanvas#OnKeyDown(f4be455c09aa147).( wxKeyEventcxx . . $ wxKeyEvent#& event ){ |
| 740 |
wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(6cc2ff6820429036).(event,true,trackcxx . . $ track.); |
| •741 |
#ifndef _WIN32 |
| 742 |
wxStringcxx . . $ wxString# path = wxStandardPathscxx . . $ wxStandardPaths#::Getcxx . . $ wxStandardPathsBase#Get(26dbef459f22cfe7).().GetResourcesDircxx . . $ wxStandardPathsBase#GetResourcesDir(fd613287981dc2d5).() +cxx . . $ operator+(707d0521c75ba302). _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("/presets/new.preset"); |
| 743 |
#else |
| 744 |
wxString path = "presets\\new.preset"; |
| 745 |
#endif |
| 746 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F7cxx . . $ WXK_F7. ) { |
| •747 |
cgSettingscxx . . $ cgSettings..Savecxx . . $ CgUtil#Save(c5f7da30cbc0f4e9).((const char *)path.c_strcxx . . $ wxString#c_str(face4a406bda155c).()); |
| 748 |
} |
| 749 |
|
| 750 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F6cxx . . $ WXK_F6. ) { |
| •751 |
if (cgSettingscxx . . $ cgSettings..Loadcxx . . $ CgUtil#Load(c5f7da30cbc0f4e9).((const char *)path.c_strcxx . . $ wxString#c_str(face4a406bda155c).())) { |
| 752 |
MyTabcxx . . $ MyTab#::UpdateAllcxx . . $ MyTab#UpdateAll(49f6e7a06ebc5aa8).(); |
| 753 |
|
| 754 |
cgSettingscxx . . $ cgSettings..ResetHalocxx . . $ CgUtil#ResetHalo(49f6e7a06ebc5aa8).(); |
| 755 |
cgSettingscxx . . $ cgSettings..UpdateShaderscxx . . $ CgUtil#UpdateShaders(49f6e7a06ebc5aa8).(); |
| 756 |
SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 757 |
} |
| 758 |
|
| 759 |
} |
| 760 |
|
| 761 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F5cxx . . $ WXK_F5. ) { |
| 762 |
molcxx . . $ mol..PrepareAOSingleViewcxx . . $ Mol#PrepareAOSingleView(49f6e7a06ebc5aa8).(); |
| 763 |
SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 764 |
} |
| 765 |
|
| 766 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F2cxx . . $ WXK_F2. ) { |
| 767 |
static int status=0; |
| 768 |
status=(status+1) % 5; |
| 769 |
draw_ballscxx . . $ draw_balls. = (status==0) || (status==1) || (status==2) ; |
| 770 |
draw_stickscxx . . $ draw_sticks. = (status==0) || (status==1) || (status==3) || (status==4) ; |
| 771 |
draw_wireframe_ballscxx . . $ draw_wireframe_balls.= (status==1) ; |
| 772 |
draw_wireframe_stickscxx . . $ draw_wireframe_sticks.= (status==1) || (status==3) ; |
| 773 |
|
| 774 |
SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 775 |
} |
| 776 |
|
| 777 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F1cxx . . $ WXK_F1. ) { |
| 778 |
wxStringcxx . . $ wxString# textcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 779 |
if (!molcxx . . $ mol..IsReadycxx . . $ Mol#IsReady(c9857a73d68e59ba).() ) text=cxx . . $ wxString#`operator=`(5e44a138b86cc9f6).wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("(no molecule)"); |
| 780 |
else { |
| 781 |
|
| 782 |
text=cxx . . $ wxString#`operator=`(ff83020b0ee191dd).wxStringcxx . . $ wxString#wxString(d8fbdb5007e68754).( molcxx . . $ mol..GetMolNamecxx . . $ Mol#GetMolName(41208ce6ca65dd58).(), wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`! ).BeforeLastcxx . . $ wxString#BeforeLast(e5ded6684ad74923).('.'cxx . . $ wxUniChar#wxUniChar(44b6ea1973a07080).) +cxx . . $ operator+(707d0521c75ba302). |
| 783 |
wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("\n (file: \"")+cxx . . $ operator+(96824dc35ae3c3a2).wxStringcxx . . $ wxString#wxString(d8fbdb5007e68754).( molcxx . . $ mol..filenamecxx . . $ Mol#filename., wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`! ) +cxx . . $ operator+(707d0521c75ba302).wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("\")\n\n"); |
| 784 |
|
| 785 |
text=cxx . . $ wxString#`operator=`(ff83020b0ee191dd).text+cxx . . $ operator+(96824dc35ae3c3a2).wxStringcxx . . $ wxString#::Formatcxx . . $ wxString#Format(790352b8134174a2).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%d atoms\n"),molcxx . . $ mol..atomcxx . . $ Mol#atom..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()); |
| 786 |
|
| 787 |
if (molcxx . . $ mol..stickscxx . . $ Mol#sticks.) { |
| 788 |
text=cxx . . $ wxString#`operator=`(ff83020b0ee191dd).text+cxx . . $ operator+(96824dc35ae3c3a2).wxStringcxx . . $ wxString#::Formatcxx . . $ wxString#Format(790352b8134174a2).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%d bonds\n"),molcxx . . $ mol..bondcxx . . $ Mol#bond..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()); |
| 789 |
} |
| 790 |
|
| 791 |
|
| 792 |
text=cxx . . $ wxString#`operator=`(ff83020b0ee191dd).text+cxx . . $ operator+(96824dc35ae3c3a2).wxStringcxx . . $ wxString#::Formatcxx . . $ wxString#Format(a12bbbdeb997b7b6).( |
| 793 |
_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("\nUsing:\n Texture size = %dx%d\n Patch size=%dx%d"), |
| 794 |
moltextureCanvascxx . . $ moltextureCanvas..GetHardRescxx . . $ MyCanvas#GetHardRes(b126dc7c1de90089).(), |
| 795 |
moltextureCanvascxx . . $ moltextureCanvas..GetHardRescxx . . $ MyCanvas#GetHardRes(b126dc7c1de90089).(), |
| 796 |
CSIZEcxx . . $ CSIZE.,CSIZEcxx . . $ CSIZE. |
| 797 |
); |
| 798 |
|
| 799 |
|
| 800 |
} |
| 801 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(text, _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("QuteMol - file info"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_INFORMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1905:9`!, this); |
| 802 |
} |
| 803 |
|
| 804 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F6cxx . . $ WXK_F6. ) { |
| 805 |
use_accurate_halocxx . . $ use_accurate_halo.=!use_accurate_halocxx . . $ use_accurate_halo.; |
| 806 |
SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 807 |
} |
| 808 |
|
| 809 |
// temp, should e set auto depending on dist |
| 810 |
if (event.GetKeyCodecxx . . $ wxKeyEvent#GetKeyCode(455f465bc33b4cdf).() == WXK_F2cxx . . $ WXK_F2. ) { |
| 811 |
|
| 812 |
cgSettingscxx . . $ cgSettings..P_cappingcxx . . $ CgUtil#P_capping.=!cgSettingscxx . . $ cgSettings..P_cappingcxx . . $ CgUtil#P_capping.; |
| 813 |
cgSettingscxx . . $ cgSettings..UpdateShaderscxx . . $ CgUtil#UpdateShaders(49f6e7a06ebc5aa8).(); |
| 814 |
SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 815 |
} |
| 816 |
} |
| 817 |
|
| 818 |
|
| 819 |
void MyFramecxx . . $ MyFrame#::OnAboutcxx . . $ MyFrame#OnAbout(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& WXUNUSEDcxx . . $ `<external>/14689491191722134862/defs.h:988:13`!(event)) |
| 820 |
{ |
| 821 |
} |
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
void MyFramecxx . . $ MyFrame#::OnSaveSnapcxx . . $ MyFrame#OnSaveSnap(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent# & event) |
| 826 |
{ |
| 827 |
|
| 828 |
int sx,sy; |
| 829 |
static const wxStringcxx . . $ wxString# FILETYPES = _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!( |
| 830 |
"PNG (lossless)|*.png|" |
| 831 |
"JPEG (lossy)|*.jpg|" |
| 832 |
"GIF animation|*.gif" |
| 833 |
); |
| 834 |
wxFileDialogcxx . . $ wxFileDialog# * saveSnapDialog = |
| 835 |
new wxFileDialogcxx . . $ wxFileDialog# ( this, |
| 836 |
wxStringcxx . . $ wxString#wxString(1751db0bab16ee59). (_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Save a snapshot")), |
| 837 |
wxStringcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).(), // def path |
| 838 |
wxStringcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).(), |
| 839 |
FILETYPES, |
| •840 |
wxFD_SAVEcxx . . $ wxFD_SAVE. | /*wxFD_CHANGE_DIR |*/ wxFD_OVERWRITE_PROMPTcxx . . $ wxFD_OVERWRITE_PROMPT. |
| 841 |
); |
| 842 |
|
| 843 |
static int lastFilterIndex=-1; |
| 844 |
|
| 845 |
if (lastFilterIndex==-1) lastFilterIndex=saveSnapDialog->GetFilterIndexcxx . . $ wxFileDialog#GetFilterIndex(455f465bc33b4cdf).(); |
| 846 |
saveSnapDialog->SetFilterIndexcxx . . $ wxFileDialog#SetFilterIndex(d4f767463ce0a6b3).( lastFilterIndex ); |
| 847 |
|
| 848 |
wxStringcxx . . $ wxString# extcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 849 |
if (lastFilterIndex==1) ext=cxx . . $ wxString#`operator=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(".jpg"); |
| 850 |
else if (lastFilterIndex==2) ext=cxx . . $ wxString#`operator=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(".gif"); |
| 851 |
else ext=cxx . . $ wxString#`operator=`(5e44a138b86cc9f6)._Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(".png"); |
| 852 |
saveSnapDialog->SetFilenamecxx . . $ wxFileDialog#SetFilename(eec3608749d303b4).( wxStringcxx . . $ wxString#wxString(d8fbdb5007e68754).( molcxx . . $ mol..GetFilenameSnapcxx . . $ Mol#GetFilenameSnap(41208ce6ca65dd58).(), wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`! )+cxx . . $ operator+(96824dc35ae3c3a2). ext ); |
| 853 |
static wxStringcxx . . $ wxString# CANNOT_SAVE = _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Could not save snap!\n\nYou might try setting\na lower resolution\nor removing AntiAliasing..."); |
| 854 |
if (saveSnapDialog->ShowModalcxx . . $ wxFileDialog#ShowModal(b126dc7c1de90089).() == wxID_OKcxx . . $ wxID_OK.) |
| 855 |
if ((new savesnapDialogcxx . . $ savesnapDialog#(this,saveSnapDialog->GetFilterIndexcxx . . $ wxFileDialog#GetFilterIndex(455f465bc33b4cdf).()))->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).() == wxID_OKcxx . . $ wxID_OK. ) |
| 856 |
{ |
| 857 |
|
| 858 |
|
| 859 |
int jj=saveSnapDialog->GetFilterIndexcxx . . $ wxFileDialog#GetFilterIndex(455f465bc33b4cdf).(); |
| 860 |
lastFilterIndex=jj; |
| 861 |
|
| •862 |
Bytecxx . . $ Byte#* snap = 0; |
| 863 |
int AAMult=(hardSettingscxx . . $ hardSettings..SNAP_ANTIALIAScxx . . $ HardSettings#SNAP_ANTIALIAS.)?2:1; |
| 864 |
bool useTransp=(hardSettingscxx . . $ hardSettings..PNG_TRANSPARENTcxx . . $ HardSettings#PNG_TRANSPARENT.==1) && (jj==0); |
| 865 |
if (jj!=2) { |
| 866 |
|
| 867 |
sx=sy=hardSettingscxx . . $ hardSettings..SNAP_SIZEcxx . . $ HardSettings#SNAP_SIZE.*AAMult; |
| 868 |
|
| 869 |
if ((useTransp) && (cgSettingscxx . . $ cgSettings..UseHalocxx . . $ CgUtil#UseHalo(c9857a73d68e59ba).()>0)) { |
| 870 |
cgSettingscxx . . $ cgSettings..doingAlphaSnapshotcxx . . $ CgUtil#doingAlphaSnapshot.=true; |
| 871 |
cgSettingscxx . . $ cgSettings..ResetHalocxx . . $ CgUtil#ResetHalo(49f6e7a06ebc5aa8).(); |
| 872 |
cgSettingscxx . . $ cgSettings..UpdateShaderscxx . . $ CgUtil#UpdateShaders(49f6e7a06ebc5aa8).(); |
| 873 |
} |
| 874 |
|
| 875 |
snap= GetSnapshotcxx . . $ GetSnapshot(8ac90524f31ad8a9).(sx,sy, useTransp ); |
| 876 |
|
| 877 |
if (cgSettingscxx . . $ cgSettings..doingAlphaSnapshotcxx . . $ CgUtil#doingAlphaSnapshot.) { |
| 878 |
cgSettingscxx . . $ cgSettings..doingAlphaSnapshotcxx . . $ CgUtil#doingAlphaSnapshot.=false; |
| 879 |
cgSettingscxx . . $ cgSettings..ResetHalocxx . . $ CgUtil#ResetHalo(49f6e7a06ebc5aa8).(); |
| 880 |
cgSettingscxx . . $ cgSettings..UpdateShaderscxx . . $ CgUtil#UpdateShaders(49f6e7a06ebc5aa8).(); |
| 881 |
} |
| 882 |
if (!snap) { |
| 883 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(CANNOT_SAVE, _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("OpenGL problems?"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_EXCLAMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1906:9`!, this); |
| 884 |
return; |
| 885 |
} |
| 886 |
} else sx=sy=hardSettingscxx . . $ hardSettings..GIF_SNAP_SIZEcxx . . $ HardSettings#GIF_SNAP_SIZE.*AAMult; |
| 887 |
{ |
| 888 |
|
| 889 |
wxStringcxx . . $ wxString# fn=saveSnapDialog->GetPathcxx . . $ wxFileDialog#GetPath(fd613287981dc2d5).(); |
| 890 |
|
| 891 |
// fix filename Extension |
| 892 |
////////////////////////// |
| 893 |
//wxString ext[3]={ _T("png"), _T("jpg") , _T("png") }; |
| 894 |
//wxString cext=fn.AfterLast('.'); |
| 895 |
//if (cext.CmpNoCase(ext[0])||cext.CmpNoCase(ext[1])) fn=fn.BeforeLast('.'); |
| 896 |
//fn=fn+_T('.')+ext[ jj ]; |
| 897 |
|
| 898 |
switch (jj) { |
| 899 |
case 0: |
| 900 |
case 1: |
| 901 |
if (!useTransp) { |
| 902 |
StartProgresscxx . . $ StartProgress(34d26762b42c433a).("Saving snap!", 2); |
| 903 |
wxImagecxx . . $ wxImage# snapicxx . . $ wxImage#wxImage(22c31943d8af5766).(sx,sy,snap); |
| 904 |
if (AAMult!=1) snapi=cxx . . $ wxImage#`operator=`(dafe8c9c74ba901d).snapi.Scalecxx . . $ wxImage#Scale(10ee1d5e5cdcdeb2).(sx/AAMult,sy/AAMult); |
| 905 |
UpdateProgresscxx . . $ UpdateProgress(83c267b20bac841a).(1); |
| 906 |
wxBitmapcxx . . $ wxBitmap#wxBitmap(52214030be2c8edc).(snapi.Mirrorcxx . . $ wxImage#Mirror(ba732e9a4cafa813).(false)).SaveFilecxx . . $ wxBitmap#SaveFile(3a089120eca6a3ca).( |
| 907 |
fn, |
| 908 |
(jj==0)?wxBITMAP_TYPE_PNGcxx . . $ wxBITMAP_TYPE_PNG.:wxBITMAP_TYPE_JPEGcxx . . $ wxBITMAP_TYPE_JPEG. |
| 909 |
); |
| 910 |
UpdateProgresscxx . . $ UpdateProgress(83c267b20bac841a).(2); |
| 911 |
EndProgresscxx . . $ EndProgress(49f6e7a06ebc5aa8).(); |
| 912 |
} |
| 913 |
else { |
| 914 |
if (AAMult!=1) downsample2x2cxx . . $ downsample2x2(49a5bbab55ea8abc).(snap, sx, sy); |
| 915 |
PNGSaveWithAlphacxx . . $ PNGSaveWithAlpha(f0ecdd44617aa11b).((const char*)fn.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`!),snap,sx/AAMult,sy/AAMult,1); |
| 916 |
}; |
| 917 |
break; |
| 918 |
case 2: { |
| 919 |
GifWrappercxx . . $ GifWrapper# gifwcxx . . $ GifWrapper#GifWrapper(49f6e7a06ebc5aa8).; |
| •920 |
int N = 0; |
| 921 |
double totalTime = 0; |
| 922 |
double subStepTime=0; |
| 923 |
double startTime;startTime=hardSettingscxx . . $ hardSettings..GIF_INITIAL_PAUSEcxx . . $ HardSettings#GIF_INITIAL_PAUSE./1000.0; |
| 924 |
if (hardSettingscxx . . $ hardSettings..GIF_ANIMATION_MODEcxx . . $ HardSettings#GIF_ANIMATION_MODE.==0) { |
| 925 |
N=hardSettingscxx . . $ hardSettings..GIF_ROT_N_FRAMEScxx . . $ HardSettings#GIF_ROT_N_FRAMES.; |
| 926 |
totalTime=hardSettingscxx . . $ hardSettings..GIF_ROT_MSECcxx . . $ HardSettings#GIF_ROT_MSEC./1000.0; |
| 927 |
} |
| 928 |
if (hardSettingscxx . . $ hardSettings..GIF_ANIMATION_MODEcxx . . $ HardSettings#GIF_ANIMATION_MODE.==1) { |
| 929 |
N=hardSettingscxx . . $ hardSettings..GIF_INSP_N_FRAMEScxx . . $ HardSettings#GIF_INSP_N_FRAMES.; |
| 930 |
totalTime=hardSettingscxx . . $ hardSettings..GIF_INSP_MSECcxx . . $ HardSettings#GIF_INSP_MSEC./1000.0; |
| 931 |
} |
| 932 |
if (hardSettingscxx . . $ hardSettings..GIF_ANIMATION_MODEcxx . . $ HardSettings#GIF_ANIMATION_MODE.==2) { |
| 933 |
N=hardSettingscxx . . $ hardSettings..GIF_6SIDES_N_FRAMEScxx . . $ HardSettings#GIF_6SIDES_N_FRAMES.*6; |
| 934 |
totalTime=hardSettingscxx . . $ hardSettings..GIF_6SIDES_MSECcxx . . $ HardSettings#GIF_6SIDES_MSEC.*6.0/1000.0; |
| 935 |
subStepTime=hardSettingscxx . . $ hardSettings..GIF_6SIDES_PAUSEcxx . . $ HardSettings#GIF_6SIDES_PAUSE./1000.0; |
| 936 |
} |
| 937 |
|
| 938 |
StartProgresscxx . . $ StartProgress(34d26762b42c433a).("Saving GIF", N); |
| 939 |
for (int i=0; i<N; i++) { |
| 940 |
if (!UpdateProgresscxx . . $ UpdateProgress(83c267b20bac841a).(i)) break; |
| 941 |
setAniStepcxx . . $ setAniStep(ba8836b59fb42830).(double(i)/N); |
| 942 |
snap = GetSnapshotcxx . . $ GetSnapshot(8ac90524f31ad8a9).(sx,sy, false); |
| 943 |
|
| 944 |
if (!snap) { |
| 945 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(CANNOT_SAVE, _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("OpenGL problems?"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_EXCLAMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1906:9`!, this); |
| 946 |
EndProgresscxx . . $ EndProgress(49f6e7a06ebc5aa8).(); |
| 947 |
return; |
| 948 |
} |
| 949 |
|
| 950 |
if (AAMult!=1) downsample2x2NoAlphacxx . . $ downsample2x2NoAlpha(49a5bbab55ea8abc).(snap, sx, sy); |
| 951 |
gifw.AddFramecxx . . $ GifWrapper#AddFrame(61c9b99c75d32557).(snap, sx/AAMult, sy/AAMult, |
| 952 |
totalTime/N |
| 953 |
+ ( (i==0)?startTime:0) |
| 954 |
+ ( (i%(N/6)==0)?subStepTime:0) |
| 955 |
); |
| 956 |
} |
| 957 |
stopAnicxx . . $ stopAni(49f6e7a06ebc5aa8).(); |
| 958 |
gifw.Savecxx . . $ GifWrapper#Save(c5f7da30cbc0f4e9).( (const char*)fn.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`!) ); |
| 959 |
EndProgresscxx . . $ EndProgress(49f6e7a06ebc5aa8).(); |
| 960 |
} break; |
| 961 |
} |
| 962 |
|
| 963 |
} |
| 964 |
} |
| 965 |
|
| 966 |
} |
| 967 |
|
| 968 |
|
| 969 |
void MyFramecxx . . $ MyFrame#::OnReadFilecxx . . $ MyFrame#OnReadFile(867e7b693acc3d1f). (wxStringcxx . . $ wxString# filename) |
| 970 |
{ |
| 971 |
if (molcxx . . $ mol..ReadPdbcxx . . $ Mol#ReadPdb(c5f7da30cbc0f4e9).((const char*)filename.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`!) )) { |
| 972 |
if ((molcxx . . $ mol..natmcxx . . $ Mol#natm.==0) && (molcxx . . $ mol..nhetatmcxx . . $ Mol#nhetatm.!=0)) geoSettingscxx . . $ geoSettings..showHetatmcxx . . $ GeoSettings#showHetatm.=true; |
| 973 |
MyTabcxx . . $ MyTab#::EnableGeomcxx . . $ MyTab#EnableGeom(49f6e7a06ebc5aa8).(); |
| 974 |
UpdateShadowmapcxx . . $ UpdateShadowmap(49f6e7a06ebc5aa8).(); |
| 975 |
wxStringcxx . . $ wxString# namecxx . . $ wxString#wxString(d8fbdb5007e68754).( molcxx . . $ mol..GetMolNamecxx . . $ Mol#GetMolName(41208ce6ca65dd58).(), wxConvUTF8cxx . . $ `<external>/4636889142566322771/strconv.h:624:9`! ); |
| 976 |
SetTitlecxx . . $ wxTopLevelWindowGTK#SetTitle(eec3608749d303b4).( name.BeforeLastcxx . . $ wxString#BeforeLast(e5ded6684ad74923).('.'cxx . . $ wxUniChar#wxUniChar(44b6ea1973a07080).)+cxx . . $ operator+(707d0521c75ba302). _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(" - QuteMol") ); |
| 977 |
m_tbcxx . . $ MyFrame#m_tb.->SetTitleTextcxx . . $ MyToolbar#SetTitleText(867e7b693acc3d1f).(namecxx . . $ wxString#wxString(eec3608749d303b4).); |
| 978 |
geoSettingscxx . . $ geoSettings..Applycxx . . $ GeoSettings#Apply(49f6e7a06ebc5aa8).(); |
| 979 |
|
| 980 |
// redo shaders, as texture size could have changed |
| 981 |
cgSettingscxx . . $ cgSettings..UpdateShaderscxx . . $ CgUtil#UpdateShaders(49f6e7a06ebc5aa8).(); |
| 982 |
|
| 983 |
} else { |
| 984 |
wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(wxStringcxx . . $ wxString#::FromAsciicxx . . $ wxString#FromAscii(1d94b37a0d0b5d9).(QAtomcxx . . $ QAtom#::lastReadErrorcxx . . $ QAtom#lastReadError.), _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!(":-("), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_EXCLAMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1906:9`!, this); |
| 985 |
m_tbcxx . . $ MyFrame#m_tb.->SetTitleTextcxx . . $ MyToolbar#SetTitleText(867e7b693acc3d1f).(); |
| 986 |
} |
| 987 |
|
| 988 |
// remake shaders cos texture size could have changed... |
| 989 |
|
| 990 |
|
| 991 |
//theText->LoadFile(openFileDialog->GetFilename()); |
| 992 |
//SetStatusText(GetCurrentFilename(), 0); |
| 993 |
} |
| 994 |
|
| 995 |
|
| 996 |
void MyFramecxx . . $ MyFrame#::OnOpenFilecxx . . $ MyFrame#OnOpenFile(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent# & event) |
| 997 |
{ |
| 998 |
static const wxStringcxx . . $ wxString# FILETYPES = _Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!( |
| 999 |
"Protein Data Bank molecule (pdb, vdb)|*.pdb;*.vdb|" |
| 1000 |
"All files|*.*" |
| 1001 |
); |
| 1002 |
wxFileDialogcxx . . $ wxFileDialog# * openFileDialog = |
| 1003 |
new wxFileDialogcxx . . $ wxFileDialog# ( this, |
| 1004 |
wxStringcxx . . $ wxString#wxString(1751db0bab16ee59).(_Tcxx . . $ `<external>/13533349018018911527/chartype.h:238:13`!("Open file")), |
| 1005 |
wxStringcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).(), // def path |
| 1006 |
wxStringcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).(), |
| 1007 |
FILETYPES, |
| •1008 |
wxFD_OPENcxx . . $ wxFD_OPEN. | wxFD_FILE_MUST_EXISTcxx . . $ wxFD_FILE_MUST_EXIST./*| wxFD_CHANGE_DIR*/, |
| 1009 |
wxDefaultPositioncxx . . $ wxDefaultPosition.); |
| 1010 |
|
| 1011 |
if (openFileDialog->ShowModalcxx . . $ wxFileDialog#ShowModal(b126dc7c1de90089).() == wxID_OKcxx . . $ wxID_OK.) { |
| 1012 |
OnReadFilecxx . . $ MyFrame#OnReadFile(867e7b693acc3d1f).( openFileDialog->GetPathcxx . . $ wxFileDialog#GetPath(fd613287981dc2d5).() ); |
| 1013 |
} |
| 1014 |
/* wxString filename=openFileDialog->GetFilename(); |
| 1015 |
wxString dir=openFileDialog->GetDirectory();*/ |
| 1016 |
} |
| 1017 |
|
| 1018 |
void MyFramecxx . . $ MyFrame#::OnIdlecxx . . $ MyFrame#OnIdle(73da8fdfecada611).(wxIdleEventcxx . . $ wxIdleEvent#& event){ |
| 1019 |
if (molcxx . . $ mol..DoingAOcxx . . $ Mol#DoingAO(c9857a73d68e59ba).()) { |
| 1020 |
m_tbcxx . . $ MyFrame#m_tb.->UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).(true); |
| 1021 |
if (molcxx . . $ mol..PrepareAOstepcxx . . $ Mol#PrepareAOstep(83c267b20bac841a).()) { |
| 1022 |
m_canvascxx . . $ MyFrame#m_canvas.->SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 1023 |
event.RequestMorecxx . . $ wxIdleEvent#RequestMore(b45ddcbc8423892c).(false); |
| 1024 |
m_tbcxx . . $ MyFrame#m_tb.->UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).(false); |
| 1025 |
return; |
| 1026 |
} |
| 1027 |
else event.RequestMorecxx . . $ wxIdleEvent#RequestMore(b45ddcbc8423892c).(true); |
| 1028 |
} else { |
| 1029 |
event.RequestMorecxx . . $ wxIdleEvent#RequestMore(b45ddcbc8423892c).(false); |
| 1030 |
if (hardSettingscxx . . $ hardSettings..STILL_QUALITYcxx . . $ HardSettings#STILL_QUALITY.!=hardSettingscxx . . $ hardSettings..MOVING_QUALITYcxx . . $ HardSettings#MOVING_QUALITY.) |
| 1031 |
if (!m_canvascxx . . $ MyFrame#m_canvas.->shownHQcxx . . $ TestGLCanvas#shownHQ.) { |
| 1032 |
m_canvascxx . . $ MyFrame#m_canvas.->shownHQcxx . . $ TestGLCanvas#shownHQ.=true; |
| 1033 |
mustDoHQcxx . . $ mustDoHQ.=true; |
| 1034 |
m_canvascxx . . $ MyFrame#m_canvas.->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(false); |
| 1035 |
} |
| 1036 |
m_tbcxx . . $ MyFrame#m_tb.->UpdateGearsIconcxx . . $ MyToolbar#UpdateGearsIcon(b45ddcbc8423892c).(false); |
| 1037 |
} |
| 1038 |
} |
| 1039 |
|
| 1040 |
void TestGLCanvascxx . . $ TestGLCanvas#::OnMousecxx . . $ TestGLCanvas#OnMouse(7e6a1c70b0e99497).( wxMouseEventcxx . . $ wxMouseEvent#& event ) |
| 1041 |
{ |
| 1042 |
|
| 1043 |
static bool useLightTrack=false; |
| 1044 |
|
| 1045 |
if ( event.m_rightDowncxx . . $ wxMouseState#m_rightDown. || event.m_leftDowncxx . . $ wxMouseState#m_leftDown. || event.m_middleDowncxx . . $ wxMouseState#m_middleDown. ) { |
| 1046 |
if (!HasCapturecxx . . $ wxWindowBase#HasCapture(50ce9a9e25b4a850).()) CaptureMousecxx . . $ wxWindowBase#CaptureMouse(49f6e7a06ebc5aa8).(); |
| 1047 |
} |
| 1048 |
else if (HasCapturecxx . . $ wxWindowBase#HasCapture(50ce9a9e25b4a850).()) ReleaseMousecxx . . $ wxWindowBase#ReleaseMouse(49f6e7a06ebc5aa8).(); |
| 1049 |
|
| 1050 |
useLightTrack=event.m_rightDowncxx . . $ wxMouseState#m_rightDown.; |
| 1051 |
|
| 1052 |
bool consumed=false; |
| 1053 |
if (useLightTrack) { |
| 1054 |
MovingLightModecxx . . $ MovingLightMode.=true; |
| 1055 |
if (wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(d36bb307a5d901e6).( event, lightTrackcxx . . $ lightTrack.)) { |
| 1056 |
SetFocuscxx . . $ wxWindow#SetFocus(49f6e7a06ebc5aa8).(); |
| 1057 |
consumed=true; |
| 1058 |
} |
| 1059 |
} else { |
| 1060 |
MovingLightModecxx . . $ MovingLightMode.=false; |
| 1061 |
if (wxConsumeTrackBallEventcxx . . $ wxConsumeTrackBallEvent(d36bb307a5d901e6).( event, trackcxx . . $ track.)) { |
| 1062 |
SetFocuscxx . . $ wxWindow#SetFocus(49f6e7a06ebc5aa8).(); |
| 1063 |
consumed=true; |
| 1064 |
} |
| 1065 |
} |
| 1066 |
|
| 1067 |
if ((consumed) && (!event.ButtonUpcxx . . $ wxMouseEvent#ButtonUp(4a668f6de69bf818).()) && (!event.ButtonDowncxx . . $ wxMouseEvent#ButtonDown(4a668f6de69bf818).())) SceneChangedcxx . . $ TestGLCanvas#SceneChanged(49f6e7a06ebc5aa8).(); |
| 1068 |
|
| 1069 |
/* if ( event.m_rightUp ) { |
| 1070 |
useLightTrack=false; |
| 1071 |
}*/ |
| 1072 |
|
| 1073 |
} |
| 1074 |
|
| 1075 |
void TestGLCanvascxx . . $ TestGLCanvas#::InitGLcxx . . $ TestGLCanvas#InitGL(49f6e7a06ebc5aa8).() |
| 1076 |
{ |
| 1077 |
initGlcxx . . $ initGl(b126dc7c1de90089).(); |
| 1078 |
} |
| 1079 |
|