Classes | Macros | Enumerations | Functions | Variables
windows/svm-toy.cpp File Reference
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <list>
#include "../../svm.h"
Include dependency graph for windows/svm-toy.cpp:

Go to the source code of this file.

Classes

struct  point
 

Macros

#define DEFAULT_PARAM   "-t 2 -c 100"
 
#define DrawLine(dc, x1, y1, x2, y2, c)
 
#define XLEN   500
 
#define YLEN   500
 

Enumerations

enum  {
  ID_BUTTON_CHANGE, ID_BUTTON_RUN, ID_BUTTON_CLEAR, ID_BUTTON_LOAD,
  ID_BUTTON_SAVE, ID_EDIT
}
 

Functions

void button_run_clicked ()
 
HBRUSH choose_brush (int v)
 
void clear_all ()
 
void draw_all_points ()
 
void draw_point (const point &p)
 
int getfilename (HWND hWnd, char *filename, int len, int save)
 
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
 
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
 

Variables

HBRUSH brush1
 
HBRUSH brush2
 
HBRUSH brush3
 
HBITMAP buffer
 
HDC buffer_dc
 
COLORREF colors []
 
int current_value = 1
 
HWND edit
 
HWND main_window
 
list< pointpoint_list
 
HDC window_dc
 

Macro Definition Documentation

◆ DEFAULT_PARAM

#define DEFAULT_PARAM   "-t 2 -c 100"

Definition at line 10 of file windows/svm-toy.cpp.

◆ DrawLine

#define DrawLine (   dc,
  x1,
  y1,
  x2,
  y2,
 
)
Value:
do { \
HPEN hpen = CreatePen(PS_SOLID,0,c); \
HPEN horig = SelectPen(dc,hpen); \
MoveToEx(dc,x1,y1,NULL); \
LineTo(dc,x2,y2); \
SelectPen(dc,horig); \
DeletePen(hpen); \
} while(0)
c
Definition: easy.py:61

Definition at line 13 of file windows/svm-toy.cpp.

◆ XLEN

#define XLEN   500

Definition at line 11 of file windows/svm-toy.cpp.

◆ YLEN

#define YLEN   500

Definition at line 12 of file windows/svm-toy.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_BUTTON_CHANGE 
ID_BUTTON_RUN 
ID_BUTTON_CLEAR 
ID_BUTTON_LOAD 
ID_BUTTON_SAVE 
ID_EDIT 

Definition at line 43 of file windows/svm-toy.cpp.

Function Documentation

◆ button_run_clicked()

void button_run_clicked ( )

Definition at line 177 of file windows/svm-toy.cpp.

◆ choose_brush()

HBRUSH choose_brush ( int  v)

Definition at line 153 of file windows/svm-toy.cpp.

◆ clear_all()

void clear_all ( )

Definition at line 146 of file windows/svm-toy.cpp.

◆ draw_all_points()

void draw_all_points ( )

Definition at line 171 of file windows/svm-toy.cpp.

◆ draw_point()

void draw_point ( const point p)

Definition at line 160 of file windows/svm-toy.cpp.

◆ getfilename()

int getfilename ( HWND  hWnd,
char *  filename,
int  len,
int  save 
)

Definition at line 131 of file windows/svm-toy.cpp.

◆ WinMain()

int WINAPI WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
PSTR  szCmdLine,
int  iCmdShow 
)

Definition at line 60 of file windows/svm-toy.cpp.

◆ WndProc()

LRESULT CALLBACK WndProc ( HWND  hwnd,
UINT  iMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 378 of file windows/svm-toy.cpp.

Variable Documentation

◆ brush1

HBRUSH brush1

Definition at line 40 of file windows/svm-toy.cpp.

◆ brush2

HBRUSH brush2

Definition at line 40 of file windows/svm-toy.cpp.

◆ brush3

HBRUSH brush3

Definition at line 40 of file windows/svm-toy.cpp.

◆ buffer

HBITMAP buffer

Definition at line 37 of file windows/svm-toy.cpp.

◆ buffer_dc

HDC buffer_dc

Definition at line 39 of file windows/svm-toy.cpp.

◆ colors

COLORREF colors[]
Initial value:
=
{
RGB(0, 0, 0),
RGB(0, 120, 120),
RGB(120, 120, 0),
RGB(120, 0, 120),
RGB(0, 200, 200),
RGB(200, 200, 0),
}

Definition at line 25 of file windows/svm-toy.cpp.

◆ current_value

int current_value = 1

Definition at line 56 of file windows/svm-toy.cpp.

◆ edit

HWND edit

Definition at line 41 of file windows/svm-toy.cpp.

◆ main_window

HWND main_window

Definition at line 36 of file windows/svm-toy.cpp.

◆ point_list

list<point> point_list

Definition at line 55 of file windows/svm-toy.cpp.

◆ window_dc

HDC window_dc

Definition at line 38 of file windows/svm-toy.cpp.



ml_classifiers
Author(s): Scott Niekum , Joshua Whitley
autogenerated on Mon Feb 28 2022 22:46:49