Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/jrincayc/ucblogo-code
26 January 2024, 08:32:20 UTC
  • Code
  • Branches (8)
  • Releases (24)
  • Visits
Revision 8d03f497146e641d7c3785ab2562b5148584fb3d authored by Joshua Cogliati on 22 November 2020, 22:08:40 UTC, committed by GitHub on 22 November 2020, 22:08:40 UTC
Merge pull request #64 from dmalec/ISSUE-63
ISSUE-63: Exit getFromWX_2 input loop on pause character sequence.
2 parent s a7bd4e1 + 4aa84f2
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/debug_stop
    • refs/heads/fix_39
    • refs/heads/makefile_updates_v2
    • refs/heads/master
    • refs/heads/message_fix
    • refs/heads/release_624_changes
    • refs/heads/utf8_play
    • refs/tags/dev-latest
    • 8d03f497146e641d7c3785ab2562b5148584fb3d
    • version_6.2.5rc1
    • version_6.2.4rc1
    • version_6.2.4
    • version_6.2.3rc1
    • version_6.2.3
    • version_6.2.2
    • version_6.2.1
    • version_6.2
    • version_6.1
    • version_6.0
    • pre_release_6_2_b
    • pre_release_6_2_a
    • pre_release_6_2_2
    • pre_release_6_1_c
    • pre_release_6_1_b
    • pre_release_6_1_a
    • last_svn_version
    • debian/6.2.4-1
    • debian/6.2.3-1
    • debian/6.2.2-3
    • debian/6.2.2-2
    • debian/6.2.2-1
    • debian/6.2.1-2
    • debian/6.2.1-1
  • d96b992
  • /
  • wxTurtleGraphics.h
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:8d03f497146e641d7c3785ab2562b5148584fb3d
origin badgedirectory badge
swh:1:dir:d96b9928ef893466ad4079ec4316955146303f57
origin badgecontent badge
swh:1:cnt:0590388ddb3a4892e5dd3d7ee348deac22ca830a
origin badgesnapshot badge
swh:1:snp:6eedb1da19a602bcc290a95dfe80bedb7646053c

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 8d03f497146e641d7c3785ab2562b5148584fb3d authored by Joshua Cogliati on 22 November 2020, 22:08:40 UTC
Merge pull request #64 from dmalec/ISSUE-63
Tip revision: 8d03f49
wxTurtleGraphics.h

#include <wx/wx.h>

#include <wx/colordlg.h>
#include <wx/image.h>
#include <wx/artprov.h>

#include <vector>
#include "LogoFrame.h"
#include "logo.h"
#include "wxTerminal.h"
#include <wx/colordlg.h>
#include <wx/image.h>
#include <wx/artprov.h>
#include "wxGlobals.h"

// ----------------------------------------------------------------------------
// structs
// ----------------------------------------------------------------------------

struct line {
	short int x1;
	short int y1;
	short int x2;
	short int y2;
	short int pw;
	unsigned char color;
	unsigned char pm;
	int vis;
};

typedef struct {
  int color;
  int xpos;
  int ypos;
  int vis;
  int pw;
  int ph;
  int pen_mode;
  } pen_info;




// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------


// what do we show on screen (there are too many shapes to put them all on
// screen simultaneously)
enum ScreenToShow
{
    Show_Default,
    Show_Text,
    Show_Lines,
    Show_Brushes,
    Show_Polygons,
    Show_Mask,
    Show_Ops,
    Show_Regions,
    Show_Circles
};

enum messageEnum {
	PREPARE = 0,
	SPLITSCREEN,
	FULLSCREEN,
	TEXTSCREEN,
	DRAWLINE,
	EDITCALL,
	CLEARSCREEN,
	SAVEPEN,
	RESTOREPEN,
	KILLAPPLICATION,
	SETPENCOLOR,
	ADDLINE,
	SETPENWIDTH,
	GETPALETTE,
	FLOODFILL,
	TOPRINTER,
	GETMOUSECOORDS,
	GETMOUSEDOWN,
	SETINFO,
	GETINFO,
	DRAWLABEL,
	CATCHUP,
	PRINTPICT,
	PRINTPREVIEWPICT,
	PRINTTEXT,
	PRINTPREVIEWTEXT
};

#define PEN_REVERSE              0
#define PEN_ERASE                1
#define PEN_DOWN                 2

#define NUMCOLORS 512
#define NUMINITCOLORS 16


// ----------------------------------------------------------------------------
// Classes
// ----------------------------------------------------------------------------

class TurtleCanvas;

// This frame will contain the TurtleCanvas
class TurtleFrame : public wxFrame
{
public:
    TurtleFrame( wxFrame * parent, const wxString& title, const wxPoint& pos, const wxSize& size);
    // event handlers (these functions should _not_ be virtual)
    void OnQuit(wxCommandEvent& event);	
    void OnShow(wxCommandEvent &event);
	
	static int 
		back_ground,
		screen_height, 
		screen_width,
	    in_graphics_mode,
	    in_splitscreen;
	static pen_info xgr_pen;
    int         m_backgroundMode;
    int         m_textureBackground;
    int         m_mapMode;
    double      m_xUserScale;
    double      m_yUserScale;
    int         m_xLogicalOrigin;
    int         m_yLogicalOrigin;
    bool        m_xAxisReversed,
		m_yAxisReversed;
    wxColour    m_colourForeground,    // these are _text_ colours
		m_colourBackground;
    wxBrush     m_backgroundBrush;
    TurtleCanvas   *m_canvas;
	
    TurtleCanvas * GetCanvas ();
private:

		// any class wishing to process wxWindows events must use this macro
		DECLARE_EVENT_TABLE()
};

struct mypoint {
    int x,y;
};

// define a scrollable canvas for drawing onto
class TurtleCanvas: public wxWindow
{
public:
    TurtleCanvas( wxFrame *parent );
    virtual ~TurtleCanvas();
    wxFrame *m_owner;
    wxPaintDC * dc;

	static void FinishedEvent();
	static void WaitForEvent();
    void OnPaint(wxPaintEvent &event);
    void OnSize(wxSizeEvent &event);
    void OnDraw(wxDC &dc);

    bool SetFont(const wxFont &f);

    void Show(ScreenToShow show) { m_show = show; Refresh(); }
	void internalPrepare();
	void TurtlePrintPreview(wxCommandEvent& event);
	void PrintTurtleWindow(wxCommandEvent& event);
    void SetOwner (wxFrame * frame);
	void SetDC (wxPaintDC * dc);
	void drawLine(wxCommandEvent & e);
    void editCall();
    void logoHandle ( wxCommandEvent & e);
    void exitApplication();
    void OnFocus (wxFocusEvent & event);
    void LoseFocus (wxFocusEvent & event);
    void OnLeftDown(wxMouseEvent& event) ;
    void OnLeftUp(wxMouseEvent& event);
     void OnMiddleDown(wxMouseEvent& event) ;
    void OnMiddleUp(wxMouseEvent& event);
     void OnRightDown(wxMouseEvent& event) ;
    void OnRightUp(wxMouseEvent& event);
    void OnMouseMove(wxMouseEvent& event) ;
    void OnChar(wxKeyEvent& event);
    static void setInfo(int type, int val);
    static int getInfo(int type);
    void OnTimer (wxTimerEvent& event);
	void OnEraseBackGround(wxEraseEvent& event) ;
    void OnPageSetup(wxCommandEvent& event);
    static void drawOneLine(struct line *, wxDC *);
    static void realFloodFill(int, wxDC *);
    static void realdoFilled(int fillcolor, int count,
				    struct mypoint *points, wxDC *dc);

    static void realDrawLabel(char *, wxDC *);
    static void realClearScreen(wxDC *);
	void PaintBackground(wxDC& dc) ;

    wxFrame *  GetOwner();
	wxDC *  GetDC();

	static int mousePosition_x;
	static int mousePosition_y;
	static int clickPosition_x;
	static int clickPosition_y;

	static int mouse_down_left;
	static int mouse_down_middle;
	static int mouse_down_right;
	static int mouse_down_last;

	static wxColour colors[NUMCOLORS+SPECIAL_COLORS];

private:
	void DrawTurtle(wxDC &dc);

	wxBitmap
		*m_bitmap;

	int resized;
	ScreenToShow m_show;
    wxBitmap     m_smile_bmp;
    wxIcon       m_std_icon;
    bool         m_clip;

    wxTimer * m_timer;


    DECLARE_EVENT_TABLE()
};


// ----------------------------------------------------------------------------
// Accessed by interpreter 
// ----------------------------------------------------------------------------
extern "C" void nop();
extern "C" void set_palette(int, unsigned int, unsigned int, unsigned int);
extern "C" void get_palette(int, unsigned int*, unsigned int*, unsigned int*);
extern "C" void save_pen(pen_info *p);
extern "C" void restore_pen(pen_info *p);
extern "C" void set_pen_patter();
extern "C" void logofill();
extern "C" void wx_clear();
extern "C" NODE lclearscreen(NODE *);
extern "C" void wxDrawLine(int x1, int y1, int x2, int y2, int vis);
extern "C" void wxSplitScreen();
extern "C" void wxFullScreen();
extern "C" void wxTextScreen();
extern "C" void wxPrepare();
extern "C" int  wxEditFile(char * f);

extern "C" int wxGetMouseX();
extern "C" int wxGetMouseY();
extern "C" int wxGetButton();

extern "C" void redraw_graphics();

extern "C" void wxSetInfo(int type, int val);
extern "C" int wxGetInfo(int type);


The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API