Classes | Defines | Enumerations | Functions | Variables
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

Defines

#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

Define Documentation

#define DEFAULT_PARAM   "-t 2 -c 100"

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

#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)

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

#define XLEN   500

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

#define YLEN   500

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


Enumeration Type Documentation

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

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

HBRUSH choose_brush ( int  v)

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

void clear_all ( )

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

void draw_all_points ( )

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

void draw_point ( const point p)

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

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

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

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

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

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

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


Variable Documentation

HBRUSH brush1

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

HBRUSH brush2

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

HBRUSH brush3

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

HBITMAP buffer

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

HDC buffer_dc

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

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.

int current_value = 1

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

HWND edit

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

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

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

HDC window_dc

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



haf_grasping
Author(s): David Fischinger
autogenerated on Thu Jun 6 2019 18:35:09